Open
Bug 1341900
Opened 7 years ago
Updated 2 years ago
WriteStructuredClone can be slow on Google Drive
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
REOPENED
Performance Impact | low |
People
(Reporter: ehsan.akhgari, Unassigned)
References
Details
(Keywords: perf)
I noticed this with <https://drive.google.com/drive/u/1/folders/0BzDhuKIxRtxdY2NucFRIQWZkZlU> open (requires LDAP access.) See the profile: https://perfht.ml/2kNMh2B This is on the 2-17 nightly.
Comment 1•7 years ago
|
||
Sounds like bug 1339481.
Comment 2•7 years ago
|
||
Yes it is: bool js::SCOutput::writeArray<unsigned short>(unsigned short const*, unsigned long)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Comment 3•7 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #2) > Yes it is: bool js::SCOutput::writeArray<unsigned short>(unsigned short > const*, unsigned long) > > *** This bug has been marked as a duplicate of bug 1339481 *** That bug really only handled the uint8_t case, not this. (And I don't even know if it'll make much of a difference; it depends on whether the optimizer was doing the same thing already.) It looks like this case is pretty similar, though; AFAICT writeArray<unsigned short> will only be called for writeChars(const char16_t* p, size_t nchars). So it's possible that a similar specialization would help, though we'd need to decide whether to specialize on endianness as well. But both cases may end up requiring sharing the data or using external strings or something. Though if you invert the call stack, you'll see that this bug's profile has 36ms for cloning uint8_t and 22ms for unsigned short. I guess this bug is for the 16-bit string portion.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Updated•7 years ago
|
Whiteboard: [qf:p1]
Reporter | ||
Updated•7 years ago
|
Whiteboard: [qf:p1] → [qf:p3]
Reporter | ||
Comment 4•7 years ago
|
||
Some sessionstore code seems to hit the 16-bot version of this function in the parent process: https://perfht.ml/2nzDBOp Doesn't take a huge amount of time each time, but this sessionstore stuff is unfortunately super inefficient, so anything we could do to cut it down would be nice.
Updated•6 years ago
|
Priority: -- → P3
Comment 5•6 years ago
|
||
I can't see the testcase, but it would be good to know if the changes under bug 1483998 helped. I haven't looked into optimizing the 16-bit writeArray, but in my profiles it looked like all time under those was just a memcpy.
Reporter | ||
Comment 6•6 years ago
|
||
Here is a new profile based on what I remember I did at the time (open the spreadsheet in comment 0, hold the arrow key to scroll all the way to the end really quickly): https://perfht.ml/2pzQebe
Updated•2 years ago
|
Performance Impact: --- → P3
Whiteboard: [qf:p3]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•