Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.