rich
rich copied to clipboard
Investigate Mypyc for Rich
It may be feasible to compile part of all of Rich with mypyc. We should investigate that.
From what I understand, a mypyc Rich wouldn't support "python -m rich.*" which would be a deal-breaker since that's a much loved feature. However we could get much of the benefits from a mypyc version of some critical files, like segment.py.
Just need to know how plausible it is right now. Maybe Textual can import this "crich". Alternatively, could we extract the slower parts of Rich in to their own lib?
@willmcgugan Should we close this?
Let's leave that up for now. I have a suspicion that some of the optimisations I've made actually work against use when compiling with mypyc (and Cython). I'd like to do a deep dive at some point to figure out why.