Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bounty explorer can be slow #689

Closed
owocki opened this issue Mar 23, 2018 · 9 comments

Comments

Projects
None yet
4 participants
@owocki
Copy link
Member

commented Mar 23, 2018

repro steps

  1. https://gitcoin.co/explorer
  2. select 'any' on the left hand side, and clear all other filters
  3. click search
  4. for 180 results, it takes about 6 seconds.

technical debugging notes

the API returns in a few hundred ms. its not a backend issue.
i think it might be a frontend rendering problem... because the HTML is passed to the $('#bounties').append(html); line of code and it still takes like 5 seconds for the browser to paint it.

possible solutions

  1. find a JS performance fix
  2. implement pagination
  3. something else?

@owocki owocki added the performance label Mar 23, 2018

@mbeacom mbeacom added the explorer label Mar 23, 2018

@mkosowsk

This comment has been minimized.

Copy link

commented Mar 23, 2018

Possible approach altho I'm not familiar with how Gitcoin does rendering: do just-in-time rendering of only Issues that are in the viewport and only populate additional issues when they need to be rendered.

@owocki this might already be what you're talking about with a pagination approach, but I like to be explicit 👍

@owocki

This comment has been minimized.

Copy link
Member Author

commented Mar 23, 2018

wasnt what i was talking about with pagination.. but it is a good idea nonetheless!

@mkosowsk

This comment has been minimized.

Copy link

commented Mar 23, 2018

This was one of the first things I implemented as a software engineer and one that I'm proud of :) Took a view that was taking ~60 seconds to load for large clients and dropped that down to <1 second with the same behavior 😍

Did this with an AngularJS directive tho so doesn't have 1:1 to Gitcoin's situation, altho think taking a look at a similar approach could be interesting 👍

@mbeacom

This comment has been minimized.

Copy link
Contributor

commented Mar 23, 2018

@mkosowsk Pagination would help this for sure, but the explorer/dashboard view pulls in all results from the bounty api and paints via jsrender at the moment.

We could setup endless scrolling via jsrender paging of the whole bounty api response, DRF pagination, or a combination of the two.

@mkosowsk

This comment has been minimized.

Copy link

commented Mar 23, 2018

@mbeacom which approach(es) do you think is appropriate to try first (possibly the one that's easiest to implement)? Could be a fun bounty for the community 😍

@Elaniobro

This comment has been minimized.

Copy link
Contributor

commented Mar 23, 2018

This would be a really fun task to take on! If available, I will give it a whirl 📟

@owocki owocki closed this in 7eb50f3 Mar 23, 2018

@owocki

This comment has been minimized.

Copy link
Member Author

commented Mar 23, 2018

just put in stopgap fix to get us through the weekend: https://gitcoin.co/explorer

@owocki

This comment has been minimized.

Copy link
Member Author

commented Mar 23, 2018

tested on desktop / mobile in chrome

@mkosowsk

This comment has been minimized.

Copy link

commented Mar 23, 2018

The old debounce... nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.