| Summary: | Web Inspector: Make console faster, only render last N messages in the DOM | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> |
| Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> |
| Status: | ASSIGNED --- | ||
| Severity: | Normal | CC: | giovanni.piller, graouts, inspector-bugzilla-changes, jonowells, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=136984 | ||
| Bug Depends on: | 155629, 157368 | ||
| Bug Blocks: | 152220 | ||
|
Description
Nikita Vasilyev
2015-02-25 00:33:41 PST
While working on code hotness visualizer, I've been logging objects every time I get data from the backend, approximately every second. Running inspector over 10 minutes makes the whole UI interface unbearably slow.
The following code shouldn't drastically affect Web Inspector performance after running for 10 minutes:
setInterval(function() {
console.log({x: Math.random()})
}, 1000);
See also: <rdar://problem/23527135> I’d prefer to have a generic solution that would also work for big data grids (e.g. in Timelines). As far as I can tell, we store console messages data only in the DOM. We don't have an array of WebInspector.ConsoleMessage instances in WebInspector.JavaScriptLogViewController or anywhere else. My first step would be to store WebInspector.ConsoleMessage instances in WebInspector.JavaScriptLogViewController, so I can render them later when needed. The first step I'd like to tackle is to render console messages only when the split console is visible or the console tab is active. AFAIK, there is currently no event like "console-show". The closest I've found so far is WebInspector.QuickConsole.Event.DidResize event and WebInspector.consoleContentView.visible getter. (In reply to comment #6) > The first step I'd like to tackle is to render console > messages only when the split console is visible or the console > tab is active. > > AFAIK, there is currently no event like "console-show". > The closest I've found so far is > WebInspector.QuickConsole.Event.DidResize event and > WebInspector.consoleContentView.visible getter. LogContentView would get hidden() and shown() called on them. Implementing those could call other code, like on JavaScriptLogViewController. |