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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: vingtetun, Unassigned)

References

Details

Attachments

(1 file)

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 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 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)
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.

Attachment

General

Created:
Updated:
Size: