homerchen19 / github-file-icons

🌈 🗂 A browser extension which gives different filetypes different icons to GitHub, GitLab, gitea and gogs.
https://chrome.google.com/webstore/detail/file-icon-for-github-and/ficfmibkjjnpogdcfhfokmihanoldbfe
MIT License
1.43k stars 68 forks source link

Performance Issues on Firefox #45

Closed Riajyuu closed 5 years ago

Riajyuu commented 6 years ago

On Firefox, this addon significantly slows down file list loading on my laptop (8G A8 AMD & 8G RAM)

homerchen19 commented 5 years ago

Can you provide more details? Like CPU or memory stats.

silverwind commented 5 years ago

I observe around 2-3 seconds until the icons are loaded in Firefox. I wonder if this can be sped up by loading your content script earlier.

homerchen19 commented 5 years ago

@silverwind Thanks for your suggestion! I just tried to use that property (its default value is "document_idle"), and here is the result.

Using "document_start":

  1. on Chrome: it doesn't work, the program can't select any element from the DOM.
  2. on Firefox: it works and improve the speed a lot, but sometimes it can't select any element from the DOM.

Using "document_end": It works for both browsers but doesn't improve the speed much (at least I can't feel any difference)

@silverwind any thought?

update: refer to the content.js from refined-github, I applied the same stategy they do and it works!

homerchen19 commented 5 years ago

@Riajyuu @silverwind I just upload the new version v0.7.1 Please try it and see whether it improves the performance.

silverwind commented 5 years ago

Thanks, this is much better. Takes maybe a few hundret miliseconds now.