Follow up to default cache handler (#71504)
Some minor optimizations: - While spreading tags is convenient and is nice if it's inline. It does require some cloning and dynamism. So it's faster if we pass the same array around in internal apis instead of cloning at each level. It also lets us add new options to those APIs later. - Export the default cache handler as the "default" export since that's what it would look like for third parties if they want to be required. So then it becomes possible to specify the default the same as a third party. - Use fixed hidden class for cache entries and other fixes - No need to buffer the chunks. It can add up memory since we have multiple copies in memory at any given time with the current naive stream teeing. We can just GC the copies immediately. - To avoid hidden class deopts we should avoid optional fields and avoid adding additional fields to existing objects. It also makes it easier to follow and avoid clashes when the same name is added both to the public and private objects.
Showing
Please
register
or
sign in
to comment