Closed
Bug 919529
Opened 13 years ago
Closed 8 years ago
Remove unused HTML characters when GAIA_OPTIMIZE=1
Categories
(Firefox OS Graveyard :: Gaia, defect)
Firefox OS Graveyard
Gaia
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: vingtetun, Unassigned)
References
Details
Attachments
(1 file)
|
967 bytes,
patch
|
etienne
:
feedback+
|
Details | Diff | Splinter Review |
It is not clear to me if that will bring anything really since the local |make test-perf| is broken... but it worth checking over datazilla.
Attachment #808571 -
Flags: review?(etienne)
Comment 1•13 years ago
|
||
Comment on attachment 808571 [details] [diff] [review]
remove-whitespaces.patch
Review of attachment 808571 [details] [diff] [review]:
-----------------------------------------------------------------
Not completely sold on it but it can't hurt.
Flagging a build system peer for the formal review though.
Attachment #808571 -
Flags: review?(poirot.alex)
Attachment #808571 -
Flags: review?(etienne)
Attachment #808571 -
Flags: feedback+
Comment 2•13 years ago
|
||
Comment on attachment 808571 [details] [diff] [review]
remove-whitespaces.patch
Review of attachment 808571 [details] [diff] [review]:
-----------------------------------------------------------------
::: build/webapp-optimize.js
@@ +389,5 @@
> htmlStr += '>\n ' + innerHTML + '\n</html>\n';
>
> + // Inline the html on one line to remove unneeded characters
> + htmlStr = htmlStr.replace(/^[ \t]*/mg, '');
> + htmlStr = htmlStr.replace(/[\r\n]/mg, '');
Ideally we would only replace /\s{2,}/ spaces occurences as 1 or n spaces are considered the same.
My concern with these regexp is that we can remove expected spaces, like this "\n":
<span>expected<span>\n<span>space</span>
Displayed as: "expected space"
will now be optimized to
<span>expected</span><span>space</span>
and displayed as: expectedspace
I wouldn't be concerned if optimized mode was always on, but it is only in production builts, so we can easily miss such very subtle regression due to optimization. I'm not sure it is really worth, unless you have seen significant improvement.
Attachment #808571 -
Flags: review?(poirot.alex)
Comment 3•8 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•