Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/technicalpickles/big-sorbet-t-enum-performance
Demonstrate what happens when using Sorbet's T::Enum that has a lot of values
https://github.com/technicalpickles/big-sorbet-t-enum-performance
Last synced: about 1 month ago
JSON representation
Demonstrate what happens when using Sorbet's T::Enum that has a lot of values
- Host: GitHub
- URL: https://github.com/technicalpickles/big-sorbet-t-enum-performance
- Owner: technicalpickles
- Created: 2023-12-01T14:49:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-01T18:15:05.000Z (about 1 year ago)
- Last Synced: 2024-10-14T21:51:54.329Z (3 months ago)
- Language: Ruby
- Size: 359 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Big Sorbet T::Enum Performance
While asking for help with performance of `bin/srb tc`, we got some help to see that there are some very slow methods to type check. This turned out to be related to having `T::Enum` with some 6k values :flush:
## Steps to Reproduce
```
git clone https://github.com/technicalpickles/sorbet-giant-tenum-example
cd sorbet-giant-tenum-example
bundle install
bundle exec srb tc --counters --web-trace-file trace.json --verbose
```Go to https://ui.perfetto.dev/ and upload trace.json to analyze. Look for `typecheckOne` spans.