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

gallery optimization #316

Merged
merged 7 commits into from
May 12, 2021
Merged

Conversation

JKrupinski
Copy link
Contributor

To avoid too many requests I had to change pausing gifs to use nft type property (which is mime type)

It works but looks like this attribute is added only for the newest NFTs

Second thing is that Money component makes too much requests to coingecko on gallery page, I've changed it to use component lazy loading and now it sends requests to coingecko only when NFT is visible

But I have another idea, maybe we can change Money component to get KSM price only once and save it in vuex?
So there will be only one request to coingecko on gallery page

@JKrupinski JKrupinski changed the title lazyload money component, use nft type to check mime type WIP: lazyload money component, use nft type to check mime type Apr 26, 2021
@JKrupinski JKrupinski changed the title WIP: lazyload money component, use nft type to check mime type WIP: gallery optimization Apr 26, 2021
@JKrupinski
Copy link
Contributor Author

  • pausing gifs is back (without any requests, it will work only for nfts with metadata nft.type)
  • request for ksm price is executed only once (page load) and fiat price is saved to vuex

@vikiival still not sure about formatBalance decimals, I saw that you changed it to 2
84f8bc0#diff-e5a8b28ff23cd499f3f7efb280de392a5175628ec1785f2e7653e91a0e41adb9R7

but it doesn't work properly, it shows for example: 4.9000 KSM / 21,520,800,000,000.0000 USD so I reverted it back to formatBalance(decimals, showFiatValue.toUpperCase()) for now

@vikiival
Copy link
Member

vikiival commented May 8, 2021

@vikiival still not sure about formatBalance decimals, I saw that you changed it to 2

Yeah It's highly possible, I think it didn't work on gallery

Meanwhile it was fixed by acc45df

@JKrupinski JKrupinski changed the title WIP: gallery optimization gallery optimization May 10, 2021
@JKrupinski
Copy link
Contributor Author

@yangwao please have a test and merge if everything looks good

@yangwao
Copy link
Member

yangwao commented May 11, 2021

Some are paused, some are not. https://deploy-preview-316--nftkodadot.netlify.app/rmrk/gallery

Ideas why? Maybe types you are checking for?

I'm stoked to have paused gifs back again :D

Screen.Recording.2021-05-11.at.10.57.44.mov
Screen.Recording.2021-05-11.at.10.56.58.mov

@JKrupinski
Copy link
Contributor Author

Some are paused, some are not. https://deploy-preview-316--nftkodadot.netlify.app/rmrk/gallery

Ideas why? Maybe types you are checking for?

I'm stoked to have paused gifs back again :D

Screen.Recording.2021-05-11.at.10.57.44.mov
Screen.Recording.2021-05-11.at.10.56.58.mov

As I wrote in previous comment it will work only for nfts with metadata nft.type (which is mime type). Not sure why some of them don't have it, any ideas?

@yangwao
Copy link
Member

yangwao commented May 11, 2021

Maybe @vikiival can chime on this. I don't know either, I mean eventually we want to migrate to subquery as it offer more room to grow :)

@vikiival
Copy link
Member

Not sure why some of them don't have it, any ideas?

They were lost in the echo.
Honestly I don't know, I can remigrate those without type.

@yangwao yangwao merged commit a8e8cdc into kodadot:main May 12, 2021
@yangwao yangwao mentioned this pull request May 12, 2021
5 tasks
@JKrupinski JKrupinski deleted the feature/gallery-optimization branch May 12, 2021 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants