tysonwolker / iterm-tab-colors

Tabs automatically change colors depending on the folder you are in.
MIT License
48 stars 7 forks source link

Speed up color selection by reducing calls to Python #8

Closed seven1m closed 4 years ago

seven1m commented 4 years ago

Preface: I did not discuss this with Tyson prior, and this may be completely unwelcome, but I thought I would put the PR out here just in case it helps someone! @tysonwolker feel free to summarily close this if you're not interested. Oh, and thanks for the really neat plugin!! ❤️


This is admittedly not nearly as pretty as Tyson's implementation, but it is quite a bit faster!

Based on my benchmarks, time measurements are:

I am (personally) willing to trade code style for speed. :^)

tysonwolker commented 4 years ago

Performance is very important in terminal, going to merge this. Nice work!