ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
318 stars 35 forks source link

performance problem #625

Closed JamYiz closed 1 year ago

JamYiz commented 1 year ago

Hello, I found out that this extension has a huge impact on browser performance. I like its right-click search function, but I don't need other functions. Is there a way to improve performance through settings?

ssborbis commented 1 year ago

Which right-click menu are you using? The Context menu ( browser UI ) or the Quick menu ( webpage UI ).

I'm curious where the performance hit is coming from. Browser loading? Page loading? Mouse movement? If you can kinda narrow down where the bottleneck is, I can look into improving things.

JamYiz commented 1 year ago

I use right-click menu via Context menu,browser is firefox. It takes a lot of performance and slows down page loads when opening a new tab. Snipaste_2023-03-08_14-50-47

ssborbis commented 1 year ago

If I'm seeing the same page load spike you are, I think it is due to the context menu being rebuilt every page load or tab activation. I may be able to skip the rebuild under certain circumstances, but due to some quirks in how addons are limited in managing the UI context menu, there will necessarily be some required rebuilds.

ssborbis commented 1 year ago

This particular slowdown ( new tabs, tab activated ) should be greatly reduced in the next major release. The context menu is no longer completely rebuilt when a tab is activated; it is updated with tab-relevant menus instead. The code is in the development branch for testing, but if you try it out make sure you are currently on 1.46.6 or greater to allow for downgrading after testing. Releases prior to 1.46.6 will have problems after installing the development code.

ssborbis commented 1 year ago

Assuming you're on FF, I have a beta to try

https://github.com/ssborbis/ContextSearch-web-ext/releases/download/1.46.9b1/contextsearch_web_ext-1.46.9b1.xpi

The context menu fixes are the only change between the beta and release.

JamYiz commented 1 year ago

Thank you for the update! After trying out this version, the slow loading issue when opening new tabs has been significantly alleviated. This was observed in the Firefox task manager: ContextSearch-web-ext still generates a large number of dispatches during the first few web pages when the browser is launched, delaying page loading, but performance improves greatly after that. The problem has been solved, and I would like to express my gratitude to you once again.

ssborbis commented 1 year ago

ContextSearch-web-ext still generates a large number of dispatches during the first few web pages when the browser is launched, delaying page loading

I'll continue looking for ways to improve performance.

The problem has been solved, and I would like to express my gratitude to you once again.

No problem, and I greatly appreciate the input. Software like this simply doesn't evolve without users like you willing to take the time to report issues and make suggestions.