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
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.
Gavin, you should review this!
<rdar://problem/8135782>
Attachment 75418 [details] did not build on qt: Build output: http://queues.webkit.org/results/6851004
Created attachment 75426 [details] fix build
Attachment 75418 [details] did not build on win: Build output: http://queues.webkit.org/results/6811012
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.
http://trac.webkit.org/changeset/73433