jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.45k stars 237 forks source link

Improve splitLines: return iterator instead #434

Closed Goose97 closed 1 year ago

Goose97 commented 1 year ago

The current behavior of splitLines is to eagerly split all the lines and return an array of strings.

This PR improves this by returning an iterator instead, which will emit lines. This lets callers decide how to best use the splitLines function (i.e. lazily enumerate over lines)

Relates to #433

coveralls commented 1 year ago

Coverage Status

coverage: 43.012%. first build when pulling 6f26e2e378f736f922151ed5c977f722afb311a7 on Goose97:split-lines-iterator into bb063e49e305210316681369d3d6eb8e779cd58b on jlfwong:main.

jlfwong commented 1 year ago

Nice! Thank you