Closed iamcarbon closed 5 months ago
After this PR, we'll be able to spanify ITypeChecker. Fun seeing these build on each other!
After this PR, we'll be able to spanify ITypeChecker. Fun seeing these build on each other!
Nice! I looked at that on the weekend and from memory it was blocked on the TGA checker that needed indexed access. Great that we can spanify it too.
I've been looking at trying to consolidate the THREE different approaches we have for reading ISO BMFF data. We have quite similar code for MP4, QuickTime and HEIF data formats. They're all different enough that it's not so straightforward, but I'm hopeful the end result will be good.
I ran a trace over the regression suite, using .NET 8 in release mode, with only the .NET runner, which reads all the input files and writes out metadata text files.
The run used 9.92 seconds of CPU. We spent 135 ms in the GC, which is < 2%. Pretty good!
Interestingly there are 22 gen 2 collections. Some of these are the LOH which would be good to investigate as ideally we wouldn't be allocating anything on the LOH. I suspect they're mostly byte arrays, but will investigate:
I also see some finalizers running for reflection emit, which I find surprising. I'll try and track those down.
This PR introduces indexed accessors on the Buffer reader, and eliminates another batch of allocations.