Closed
Bug 1245213
Opened 9 years ago
Closed 8 months ago
Servo docs hang for >20s in buildIndex() when Gecko profiler is enabled
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bholley, Unassigned)
References
(Depends on 2 open bugs, )
Details
STR:
(1) Install the gecko profiler addon in Nightly: https://github.com/bgirard/Gecko-Profiler-Addon/blob/master/geckoprofiler-signed.xpi?raw=true
(2) Make sure the icon is enabled (not grey)
(3) Visit http://doc.servo.org/string_cache/macro.atom!.html
(4) Very long hang
Reporter | ||
Comment 1•9 years ago
|
||
Looks like we spend forever in buildIndex - the profiler may be screwing up the JIT somehow. Jan said he'd take a look.
Flags: needinfo?(jdemooij)
Comment 2•9 years ago
|
||
(In reply to Bobby Holley (busy) from comment #1)
> Looks like we spend forever in buildIndex - the profiler may be screwing up
> the JIT somehow. Jan said he'd take a look.
Hm this also happens with the JITs disabled. According to a profile, we spend an insane amount of time under PCToLineNumber (called by the sampler thread).
I'll do some digging to see if this is a large script or something.
Component: JavaScript Engine: JIT → JavaScript Engine
Comment 3•9 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #2)
> I'll do some digging to see if this is a large script or something.
Bingo. We're loading this huge, 15.21 (!!) MB file: http://doc.servo.org/search-index.js
And PCToLineNumber is choking on that...
Comment 4•9 years ago
|
||
Filed a rustdoc bug: https://github.com/rust-lang/rust/issues/31387
FWIW, PCToLineNumber being slow is nothing new (bug 929950).
Comment 5•9 years ago
|
||
Bug 929950 is on my TODO list now, unfortunately I have some other things to do first.
Flags: needinfo?(jdemooij)
Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #5)
> Bug 929950 is on my TODO list now, unfortunately I have some other things to
> do first.
Awesome - thanks for digging in Jan!
Comment 7•9 years ago
|
||
The file has very few lines for its size:
$ wc search-index.js
167 316606 15954940 search-index.js
Splitting lines some more help? Or is the time spent just proportional to the total file size?
Comment 8•9 years ago
|
||
(In reply to Simon Sapin (:SimonSapin) from comment #7)
> Splitting lines some more help? Or is the time spent just proportional to
> the total file size?
Yes it's the total file size. We emit source notes for line and column numbers, and we walk all source notes from the start until we reach our bytecode pc. Splitting lines will result in more source notes, so it may actually make us slower (probably not noticeable though).
Updated•6 years ago
|
Comment 11•5 years ago
|
||
Although it's not badly slow when profiler is disabled, it still feels slower than ideal in cases like the page of Iterator trait.
Updated•2 years ago
|
Severity: normal → S3
Updated•8 months ago
|
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•