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 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 馃憤
wasnt what i was talking about with pagination.. but it is a good idea nonetheless!
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 馃憤
@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.
@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 馃槏
This would be a really fun task to take on! If available, I will give it a whirl 馃摕
just put in stopgap fix to get us through the weekend: https://gitcoin.co/explorer
tested on desktop / mobile in chrome
The old debounce... nice work!
Most helpful comment
just put in stopgap fix to get us through the weekend: https://gitcoin.co/explorer