Closed
Bug 1197377
Opened 10 years ago
Closed 10 years ago
Read callgraph.txt line by line to avoid string size limits
Categories
(Core :: JavaScript: GC, defect)
Core
JavaScript: GC
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: sfink, Assigned: sfink)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
3.26 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
Bug 1194112 is getting an allocation size error because it snarfs all of callgraph.txt into memory (immediately before splitting it into lines.)
Assignee | ||
Comment 1•10 years ago
|
||
Ok, this is a little crazy, but we can use libc to read line by line. If I only look at the time to read things into memory:
snarf the whole file: 1.8 sec
read a line at a time: 18 sec
use a generator to read a line at a time: 24 sec
It's kind of painful to take a 10x hit, but adding half a minute to the overall callgraph computation isn't a big deal. I'm not sure how long it takes, but it's a couple of minutes. (I haven't timed the before and after.)
Attachment #8651239 -
Flags: review?(terrence)
Comment 2•10 years ago
|
||
Comment on attachment 8651239 [details] [diff] [review]
Read callgraph.txt line by line to avoid string size limits
Review of attachment 8651239 [details] [diff] [review]:
-----------------------------------------------------------------
It's neat we can do that at all.
Attachment #8651239 -
Flags: review?(terrence) → review+
Comment 4•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•