Lower memory usage in the network event actor

RESOLVED WONTFIX

Status

defect
P3
normal
RESOLVED WONTFIX
7 years ago
Last year

People

(Reporter: msucan, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

We currently log the request and response bodies, raw. We keep copies in 
JavaScript strings. Usually browser's cache includes the response body and we 
duplicate that. We should avoid it by having a way to pipe data from the 
browser's cache to the remote client through a socket connection.

Things are worse in the local connection mode: we keep a response body copy in 
the Web Console client UI as well, and we "copy" that again when we display it.  
Images are base64 data URIs.

For the local connection mode we should have a way to directly display images 
from the browser's cache, ensuring no reload happens.

Anyone has thoughts on how we can improve the situation?
If we don't cache the response bodies in the server, then GC will remove the data URI strings, right? And the client can avoid storing the bodies if we want to trade snappiness for memory usage. That said, the spec for transmitting binary data through the protocol is here:

https://wiki.mozilla.org/Remote_Debugging_Protocol_Stream_Transport

Bug 797639 should provide the means to accomplish what you want.
Depends on: 797639
The problem with relying on the cache is it has an eviction policy.

You can pin things in the cache by holding on to the cache token, though... for things that are cached.
Priority: -- → P3
Inactive for the past 5 years. Closing now.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
This problem still exists, but different parts now have newer bugs (bug 868382, bug 1297525) about them, so perhaps this one is fine to leave closed...
See Also: → 868382, 1297525
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.