RESOLVED FIXED Bug 121334
XMLViewer_js and XMLViewer_css should be minified
https://bugs.webkit.org/show_bug.cgi?id=121334
Summary XMLViewer_js and XMLViewer_css should be minified
Joseph Pecoraro
Reported 2013-09-13 17:26:45 PDT
We should minimize XMLViewer.{js,css} before xxding them to reduce their size in the WebCore binary. To get their sizes: shell> symbols Release/WebCore.framework/WebCore | sed -E 's/^ *0x[0-9a-f]+ *\(( *)0x([^)]+)\)/\1\2/' | sort -r | grep XMLView Before Minimizing: 13.58k + 2.14k 3650 XMLViewer_js [NameNList, MangledNameNList, NList] 890 XMLViewer_css [NameNList, MangledNameNList, NList] After Minimizing: 10.17k + 0.66k 28b0 XMLViewer_js [NameNList, MangledNameNList, NList] 2a0 XMLViewer_css [NameNList, MangledNameNList, NList] I'm waiting on attaching a patch until bug 121183 lands. It includes the necessary minifiers.
Attachments
[PATCH] Proposed Fix (8.52 KB, patch)
2013-09-14 02:46 PDT, Joseph Pecoraro
timothy: review+
webkit-ews: commit-queue-
[PATCH] For Bots 1 (8.52 KB, patch)
2013-09-14 12:43 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2013-09-14 02:46:02 PDT
Created attachment 211637 [details] [PATCH] Proposed Fix
Early Warning System Bot
Comment 2 2013-09-14 02:54:46 PDT
Comment on attachment 211637 [details] [PATCH] Proposed Fix Attachment 211637 [details] did not pass qt-ews (qt): Output: http://webkit-queues.appspot.com/results/1819269
Early Warning System Bot
Comment 3 2013-09-14 02:57:08 PDT
Comment on attachment 211637 [details] [PATCH] Proposed Fix Attachment 211637 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1875284
Timothy Hatcher
Comment 4 2013-09-14 11:04:19 PDT
I thought we removed XMLViewer…
Timothy Hatcher
Comment 5 2013-09-14 11:05:20 PDT
Comment on attachment 211637 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=211637&action=review > Source/WebCore/DerivedSources.make:769 > + python "$(WebCore)/inspector/Scripts/cssmin.py" <"$(WebCore)/xml/XMLViewer.css" > ./XMLViewer.min.css This suggests the scripts should move up to a top level WebCore/Scripts directory.
Joseph Pecoraro
Comment 6 2013-09-14 12:40:00 PDT
(In reply to comment #5) > (From update of attachment 211637 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=211637&action=review > > > Source/WebCore/DerivedSources.make:769 > > + python "$(WebCore)/inspector/Scripts/cssmin.py" <"$(WebCore)/xml/XMLViewer.css" > ./XMLViewer.min.css > > This suggests the scripts should move up to a top level WebCore/Scripts directory. They also already use inspector/xxd.pl. If we move scripts, I want to do it all at once. The inspector scripts are all over.
Joseph Pecoraro
Comment 7 2013-09-14 12:43:22 PDT
Created attachment 211662 [details] [PATCH] For Bots 1
Timothy Hatcher
Comment 8 2013-09-14 15:04:38 PDT
Comment on attachment 211637 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=211637&action=review >>> Source/WebCore/DerivedSources.make:769 >>> + python "$(WebCore)/inspector/Scripts/cssmin.py" <"$(WebCore)/xml/XMLViewer.css" > ./XMLViewer.min.css >> >> This suggests the scripts should move up to a top level WebCore/Scripts directory. > > They also already use inspector/xxd.pl. > > If we move scripts, I want to do it all at once. The inspector scripts are all over. Fair enough.
Joseph Pecoraro
Comment 9 2013-09-14 17:27:08 PDT
Hugo Parente Lima
Comment 10 2013-09-16 12:23:40 PDT
Comment on attachment 211662 [details] [PATCH] For Bots 1 View in context: https://bugs.webkit.org/attachment.cgi?id=211662&action=review > Source/WebCore/CMakeLists.txt:3059 > + COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/Scripts/cssmin.py <${WEBCORE_DIR}/xml/XMLViewer.js > ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewer.min.js This should be jsmin.py instead of cssmin.py. Also should have a space after "<" or cmake will expand this like "/usr/bin/python2 WEBKITDIR/Source/WebCore/inspector/Scripts/cssmin.py "<WEBKITDIR/Source/WebCore/xml/XMLViewer.css" > WEBKITDIR/WebKitBuild/Release/DerivedSources/WebCore/XMLViewer.min.css" I'm going to upload a patch these cmake issues.
Joseph Pecoraro
Comment 11 2013-09-16 12:27:33 PDT
(In reply to comment #10) > (From update of attachment 211662 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=211662&action=review > > > Source/WebCore/CMakeLists.txt:3059 > > + COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/Scripts/cssmin.py <${WEBCORE_DIR}/xml/XMLViewer.js > ${DERIVED_SOURCES_WEBCORE_DIR}/XMLViewer.min.js > > This should be jsmin.py instead of cssmin.py. > > Also should have a space after "<" or cmake will expand this like "/usr/bin/python2 WEBKITDIR/Source/WebCore/inspector/Scripts/cssmin.py "<WEBKITDIR/Source/WebCore/xml/XMLViewer.css" > WEBKITDIR/WebKitBuild/Release/DerivedSources/WebCore/XMLViewer.min.css" > > I'm going to upload a patch these cmake issues. Good catches. Please CC me so I can review.
Alexey Proskuryakov
Comment 12 2013-09-17 10:49:47 PDT
Is this really worth it? Do we expect to make performance better with 5K improvements to binary size?
Ryosuke Niwa
Comment 13 2013-09-17 10:56:13 PDT
(In reply to comment #12) > Is this really worth it? Do we expect to make performance better with 5K improvements to binary size? I don't think this change alone will improve the performance per se. But when we have hundreds of small changes like this, the result accumulates and makes a difference.
Note You need to log in before you can comment on or make changes to this bug.