Open Bug 1958673 Opened 16 days ago Updated 13 days ago

Testcase opening N IDB connections keeps the disc busier for 11x more time on Firefox (N=5000)

Categories

(Core :: Storage: IndexedDB, enhancement)

enhancement

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Depends on 2 open bugs)

Details

Attachments

(1 file)

Attached file IDB Connections.HTML

Open testcase

N=1000
Firefox: https://share.firefox.dev/3EbY0lt
Chrome: https://share.firefox.dev/41YNffp

N=5000
Firefox: https://share.firefox.dev/3RDFiGk (120s)
Chrome: https://share.firefox.dev/42wh0Ep (11s)

Artificial testcase generated by chatgpt based on my prompts. But maybe it highlights some hotspots?

See Also: → 1951283

This may be a dupe of bug 1951283. If so, please feel free to dupe. :)

Part of the overhead seems to be coming from us opening and closing the DB twice, see bug 1454309 comment 2. Now that bug 1121282 has been fixed, we could probably try to optimize this? Maybe we even have a bug on file for this?

Type: defect → enhancement
Flags: needinfo?(jan.varga)
See Also: → 1121282, 1454309

Yeah there's bug 1541548 and it mentions bug 1121282, but I'm not sure if the fix for bug 1121282 also enabled "shifting ownership of connections" as described in bug 1121282. It seems that's not yet supported given Connection::eventTargetOpenedOn is const:
https://searchfox.org/mozilla-central/rev/380b8fd795e7d96d8a5a3e6ec2b50a9f2b65854a/storage/mozStorageConnection.h#185

Flags: needinfo?(jan.varga)
Depends on: 1541548

mozilla::net::CacheIndex::FrecencyArray::RecordExistedUnlocked seems to use a bit problematic data structure.
Cache I/O 2 spends pretty much all of its time in nsTArray operations in the first profile.

Depends on: 1959090
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: