RESOLVED FIXED 50412
http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading
https://bugs.webkit.org/show_bug.cgi?id=50412
Summary http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during...
Antti Koivisto
Reported 2010-12-02 14:43:43 PST
http://www.wunderground.com/US/CA/Hayward.html causes big memory spike (>60MB) during page loading. The memory i used under this stack: #0 JSC::JSString::resolveRope (this=0x107cdaa0, exec=0x131b5098) at /Users/antti/jasper/webkit/JavaScriptCore/runtime/JSString.cpp:46 #1 0x00390821 in JSC::JSString::value (this=0x107cdaa0, exec=0x131b5098) at JSString.h:327 #2 0x004ca677 in JSC::JSValue::toThisString (this=0xb01ca590, exec=0x131b5098) at JSObject.h:731 #3 0x004c7978 in JSC::stringProtoFuncSubstr (exec=0x131b5098, thisValue={m_ptr = 0x107cdaa0}, args=@0xb01ca728) at /Users/antti/jasper/webkit/JavaScriptCore/runtime/StringPrototype.cpp:728 #4 0x00420743 in JSC::Interpreter::privateExecute (this=0x9855200, flag=JSC::Interpreter::Normal, registerFile=0x985520c, callFrame=0x131b505c, e
Attachments
avoid flattening ropes when creating substrings (9.30 KB, patch)
2010-12-02 15:12 PST, Antti Koivisto
no flags
fix build (9.33 KB, patch)
2010-12-02 15:51 PST, Antti Koivisto
barraclough: review+
Antti Koivisto
Comment 1 2010-12-02 15:12:03 PST
Created attachment 75418 [details] avoid flattening ropes when creating substrings Creating a substring caused the original string be flattened if it was in the rope form. This could use significant amount of memory by reducing buffer sharing between strings. Add a rope specific substring function that constructs the substring by reusing the rope fibers instead of flattening the rope. No change observed in SunSpider.
Darin Adler
Comment 2 2010-12-02 15:13:33 PST
Gavin, you should review this!
Antti Koivisto
Comment 3 2010-12-02 15:19:11 PST
Early Warning System Bot
Comment 4 2010-12-02 15:36:04 PST
Antti Koivisto
Comment 5 2010-12-02 15:51:57 PST
Created attachment 75426 [details] fix build
Build Bot
Comment 6 2010-12-02 15:58:44 PST
Gavin Barraclough
Comment 7 2010-12-02 16:12:40 PST
Comment on attachment 75426 [details] fix build r+. This looks good to me, but please fix up the existing use of int instead of unsigned for the string length, & remove associated casts.
Antti Koivisto
Comment 8 2010-12-07 03:11:36 PST
Note You need to log in before you can comment on or make changes to this bug.