Closed jccr closed 6 months ago
There's a cost in doing that though. If we add this as a feature, we need to make sure that it can be turned off as well.
I have not measured the runtime costs empirically, but there sure is an impact when parsing (for example) an EPUB, and when every image resource is accessed to determine the width + height. In the Node / JavaScript implementation (TypeScript) this job is blocking (waiting on an async promise), and the job is delegated to an external library that knows how to parse image file headers. The filesystem I/O is minimal in terms of the number of bytes accessed, but opening/closing many file handles is not completely free :)
Ah yes.. I remember that blocking job very well :) Thanks, both of you, for the reminder about the cost of calculating this.
I noticed this change when comparing outputs of the Go streamer and the JS streamer.