AtomMaterialUI / a-file-icon-web

Atom Material Icons plugin for Google Chrome and Firefox! Supports GitHub, GitLab, Gitee and BitBucket.
https://chrome.google.com/webstore/detail/atom-file-icons-web/pljfkbaipkidhmaljaaakibigbcmmpnc
MIT License
17 stars 5 forks source link

Load icons asynchronously? #124

Closed D3SOX closed 1 year ago

D3SOX commented 2 years ago

Is your feature request related to a problem? Please describe. When browsing repositories with many files in them, it significantly increases the time it needs to load.

Describe the solution you'd like Show the GitHub icons first, then load the custom icons asynchronously in the background.

Describe alternatives you've considered Somehow preloading the icons?

Additional context I'm not sure if it has something to do with the Firefox version of the add-on. I'll have to double-check if the performance impact is also that big in Chromium based browsers.

jkowalleck commented 2 years ago

When browsing repositories with many files in them, it significantly increases the time it needs to load.

Could you provide an example URL of such a page?

D3SOX commented 2 years ago

@jkowalleck It only seems to happen when browsing from one folder to another.

For example, try visiting https://github.com/bikass/kora/tree/master/kora/actions then click on symbolic

When loading https://github.com/bikass/kora/tree/master/kora/actions/symbolic directly, it does not produce any lag for me.

Recording showing the behavior (in a clean Firefox profile):

https://user-images.githubusercontent.com/24937357/165186354-c7ad4e6b-190b-48eb-a0c5-b71dab75e15e.mp4

GitHub
kora/kora/actions at master · bikass/kora
Kora icon theme for GNU/Linux os. Contribute to bikass/kora development by creating an account on GitHub.
GitHub
kora/kora/actions/symbolic at master · bikass/kora
Kora icon theme for GNU/Linux os. Contribute to bikass/kora development by creating an account on GitHub.
mallowigi commented 2 years ago

Interesting, I knew about such an issue but I didn't think it was caused by the extension. I'll look into it.