Open Bug 1667026 Opened 4 years ago Updated 3 years ago

Remove SourceQueue entirely

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

Attachments

(2 files)

Bug 1620280 will make the SourceQueue module:
https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/utils/source-queue.js
only used for source mapped sources.
But given how it is being used, by queuing source and flushing immediately, we should be able to remove it. Instead we should be able to call newOriginalSources action once, we all mapped sources.

https://searchfox.org/mozilla-central/source/devtools/client/debugger/src/actions/sources/newSources.js#66-83

Severity: -- → S3
Priority: -- → P3
Attachment #9177577 - Attachment description: Bug 1667026 - Remove SourceQueue entirely. → Bug 1667026 - [devtools] Remove SourceQueue entirely.
Blocks: 1749767
Depends on: 1749763

Removal of source queue was blocked by the possible performance regression of no longer throlling original sources.
Bug 1749763 will extend test coverage to ensure that we decently handle slow loading source map.
Then we should have a higher confidence in dropping it.

We also the opportunity to reuse ResourceCommand throttling mechanism in order to ensure we don't process original sources individual and throttle their processing.

Depends on: 1749769

For now, generated sources are SOURCE resources,
but original sources are some custom object internal to the debugger.

It may help overall code comprehension to have both type of sources be
at the same level and both be resources.
Also, here, it would help get rid of SourceQueue from the debugger frontend,
which is yet another way to do throttling. By making original sources
be emitted by the ResourceCommand we would benefit from its builtin throttling mechanism.

The only downside here is that it would be the very first 100% client side generated resource.
The expectation if that all resources are being generated by the server.
We would break that rule and introduce a special codepath for this.

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

Attachment

General

Created:
Updated:
Size: