There was a subtle bug in `trimTextMid` caused by calling substring methods with non-integer values. This happens because `findValueBisect` returns non-integer values, and there was no special handling of this. The bug results in strings cutting off many of the last few characters in a string, rather than always displaying it when possible. Before: <img width="368" alt="image" src="https://github.com/jlfwong/speedscope/assets/150329/754a25f1-a6f7-46f1-8e34-059503d9e4cf"> After: <img width="386" alt="image" src="https://github.com/jlfwong/speedscope/assets/150329/b2688ca1-54af-4d2e-b704-9f3322d2e5b4"> Fixes #411
Speedscope TypeScript source
This directory contains the bulk of speedscope's source code.
Subdirectories
gl/: WebGL code. This includes e.g. the code to render flamecharts.import/: Code to import profiles from varous profilers into speedscope. This include e.g. the code to import Chrome performance profiles.lib/: Mostly dependency-less utilities. This includes e.g. an LRU cache implementation, basic linear algebra classes, and the definition of speedscope's file format.app-state/: Speedscope's application state managementtypings/: TypeScript definition filesviews/: View code to generate the HTML & CSS used to construct the UI. Implemented usingpreactandaphrodite.