Closed
Bug 990324
Opened 11 years ago
Closed 10 years ago
Optimise our jQuery build
Categories
(Marketplace Graveyard :: Code Quality, defect, P2)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: cvan, Assigned: kngo)
References
()
Details
(Keywords: perf)
https://marketplace-stage.cdn.mozilla.net/media/fireplace/js/include.js?b=1396040642189
Currently, jQuery accounts for 1/6 of the size of our minifed JS bundle. Let's reduce the number of things that depend on jQuery.
Reporter | ||
Updated•11 years ago
|
Updated•11 years ago
|
Blocks: tarako-marketplace
Updated•11 years ago
|
No longer blocks: tarako-marketplace
Updated•11 years ago
|
Priority: -- → P2
Comment 1•10 years ago
|
||
FWIW, dropping "css" from jQuery would gain us a few kilobytes after minification & gzip.
However, that'd mean no .show()/.hide(), no .width()/.height(), and of course no .css() (and a few others). There is not that much code in fireplace using those methods, so it could be done (we are already toggling classes a lot instead of manipulating CSS directly) if we truly care... and that could even be a good step towards completely removing jQuery :-)
Reporter | ||
Comment 2•10 years ago
|
||
The nicest thing jQuery has to offer IMO is its event delegation, and the ability to bind multiple event listeners at once. Write that code as a standalone lib, and jQuery can be pretty easily removed. Oh and swap out all jQuery deferreds and use ES6 promises (using a polyfill).
Updated•10 years ago
|
Blocks: marketplace-perf
Assignee | ||
Comment 3•10 years ago
|
||
I was looking at this earlier today, it seems there are a few modules we can get rid of with some elbow grease.
I started up mozilla/marketplace-jquery to host our own build through Bower. What's nice is that each frontend project can independently decide which version it wants to use, so we can focus on Fireplace.
Assignee: nobody → kngo
Assignee | ||
Comment 4•10 years ago
|
||
In today's feature-after-feature Marketplace, just going to leave it.
If in a world of a new Marketplace, we just wouldn't use jQuery at all.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•