andy-portmen / country-flags

adds a toolbar button to browser address-bar displaying current physical location of visited website
https://webextension.org/listing/country-flags.html
Mozilla Public License 2.0
133 stars 35 forks source link

performance on start-up #37

Closed Djfe closed 6 years ago

Djfe commented 6 years ago

how much performance does it take to get the country code for every open tab on start-up, if the user has several hundred tabs open? Is this stuff executed in the background, so that it doesn't matter? Can it be delayed until the tab is actually used? (or is that not necessary?)

andy-portmen commented 6 years ago

I would say after the optimizations I've done it is not going to affect the browser performance at all. You can confirm this by installing the extension in the developer mode and then open many tabs and do a reload (extension reload). It will resolve all the IP addresses once the database is ready (once the service worker is initiated).

Please reopen if you can confirm a considerable CPU usage during a reload.