httpswitchboard
httpswitchboard copied to clipboard
Let go of jQuery in popup.js (long term)
I like jQuery, but only a fraction of the framework is used in popup.js, and I suspect the overhead of loading jQuery everytime the user click on the extension popup button is affecting how fast the matrix comes up.
Need something as lean as possible, popup.js doesn't really need the full jQuery framework.
Could Zepto JS be enough?
Besides, I don't know if it is related but I have performance issues with the popup on Polygon.com. The scrolling is not smooth at all.
I use Chrome 35.0.1916.114 m on Win81 x64 with HTTP Switchboard 0.9.4.3.
Could Zepto JS be enough
I looked at zepto, not in-depth mind you. The thing is, I already consider javascript to be a framework, and in this case, what I need is something specialized to manage the matrix, and really nothing more. Any framework, however small, will come with more than I need.
Re. Polygon.com, I looked and I didn't experience any problem. Although, if any net request is made while the matrix is opened, it will be recreated from scratch, which I suppose may lead to what you describes. At some point I wanted to address this by updating the matrix incrementally in a smarter way (often a net request only necessitate to change the count in a cell, not rebuilding the whole matrix), but never took the time to really address this yet.
I tried with the dev tools open and didn't see any request while scrolling inside the popup. I use the allow-all/block-exceptionally with the default lists + liste_fr.txt.
(Should I open a new issue for that?)
Should I open a new issue for that?
Maybe. Somebody with Win81 x64 will have to confirm, because as I said I can't see this. And that it is specific to one site would be quite weird, I don't know what to make of this. The matrix is just standard HTML/CSS really. How is the CPU monitor when this happens? Could there be something in the background sucking all the CPU cycles? (I don't have any plugins enabled or other add-ons here).
While scrolling inside the popup, Chrome task manager indicates that 25 (unit, %?) is used by HTTP Switchboard and nothing else. I have a i5-4670 cpu.
I tried with all extensions disabled but HTTPSB too.
You have a better CPU than me. I guess you should just open an issue, detailed enough, so that anybody else having the same problem can confirm.
By the way, when I said I disabled all plug-ins, I mean the literal plug-ins (Flash, etc.), not just the extensions.
Not sure how much of jQuery you're using, but take a look here: http://microjs.com/, there are some nice micro libs. (Had no time to look at the source code, that's why I don't know)
Does this issue now describe bringing over udom.js to HTTPSB?
Yes, I think that's what I will do eventually.