The summary says it all. We're using a ridiciolous amount of memory for simple classes like SVGRectElement. Each SVGAnimatedProperty stores a pointer back to the SVG*Element which owns it - this is just needed for the bindings, and can be reworked in a different way, that does not consume memory :-) Believe it or not, the upcoming patch will cut WebCore library size to 70% and reduces the SVG memory consumption to <25% of the current amount.
Created attachment 47466 [details] Patch v1 - Part 1/2 (actual patch)
Created attachment 47467 [details] Patch v1 - Part 2/2 (boring changes to all SVG*Element files)
Attachment 47466 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/svg/SVGElement.h:27: Alphabetical sorting problem. [build/include_order] [4] WebCore/svg/SVGElement.h:112: Alphabetical sorting problem. [build/include_order] [4] WebCore/svg/SVGPolyElement.cpp:96: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] WebCore/svg/SVGPolyElement.cpp:97: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] Skipping input 'WebCore/svg/SynchronizablePropertyController.h': Can't open for reading WebCore/svg/SVGAnimatedPropertySynchronizer.h:28: Code inside a namespace should not be indented. [whitespace/indent] [4] WebCore/svg/SVGAnimatedPropertyTraits.h:36: Code inside a namespace should not be indented. [whitespace/indent] [4] Skipping input 'WebCore/svg/SynchronizablePropertyController.cpp': Can't open for reading Skipping input 'WebCore/svg/SynchronizableTypeWrapper.h': Can't open for reading Total errors found: 6 If any of these errors are false positives, please file a bug against check-webkit-style.
Attachment 47467 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/svg/SVGFEDiffuseLightingElement.h:50: Tab found; better to use spaces [whitespace/tab] [1] Total errors found: 1 If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #3) > Attachment 47466 [details] did not pass style-queue: > > Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 > WebCore/svg/SVGElement.h:27: Alphabetical sorting problem. > [build/include_order] [4] > WebCore/svg/SVGElement.h:112: Alphabetical sorting problem. > [build/include_order] [4] > WebCore/svg/SVGPolyElement.cpp:96: Boolean expressions that span multiple > lines should have their operators on the left side of the line instead of the > right side. [whitespace/operators] [4] > WebCore/svg/SVGPolyElement.cpp:97: Boolean expressions that span multiple > lines should have their operators on the left side of the line instead of the > right side. [whitespace/operators] [4] > Skipping input 'WebCore/svg/SynchronizablePropertyController.h': Can't open for > reading > WebCore/svg/SVGAnimatedPropertySynchronizer.h:28: Code inside a namespace > should not be indented. [whitespace/indent] [4] > WebCore/svg/SVGAnimatedPropertyTraits.h:36: Code inside a namespace should not > be indented. [whitespace/indent] [4] > Skipping input 'WebCore/svg/SynchronizablePropertyController.cpp': Can't open > for reading > Skipping input 'WebCore/svg/SynchronizableTypeWrapper.h': Can't open for > reading > Total errors found: 6 Fixed all errors except the one in SVGElement.h:112, the include is required to be below the SVGElement declarations. Also fixed the tab in SVGFEDiffuseLightingElement.h
Comment on attachment 47466 [details] Patch v1 - Part 1/2 (actual patch) r=me
Comment on attachment 47467 [details] Patch v1 - Part 2/2 (boring changes to all SVG*Element files) In all of the updated constructors you have removed member initialisers for float types which is not cool
Comment on attachment 47467 [details] Patch v1 - Part 2/2 (boring changes to all SVG*Element files) r=me
Thanks for the quick review. Landed in r53879.