xonsh with pypy

160 views
Skip to first unread message

eskhool

unread,
Jun 22, 2015, 7:23:35 AM6/22/15
to xo...@googlegroups.com
Hi,
 I've recently discovered xonsh since I was looking for something so exactly like it. Its almost like someone picked my brain and made exactly what I wanted. Wait did I telepathically influence Anthony et all, this is how people start feeling they are psychic! :)

I opened some feature requests based on fish before I found the mailing list, so starting the discussion for the 3rd major thing that I noticed. 

Speed/Performance. 

xonsh seems to have a slight lag (as is to be somewhat expected) but I wonder if trying to move to pypy might alleviate this? I assume the delay is CPU bound due to python and a JIT like pypy should work well. I do see the Python 3.2.5 vs 3.4 compatibility. 

Any thoughts?

Thanks,
Anshuman


eskhool

unread,
Jun 23, 2015, 7:42:23 AM6/23/15
to xo...@googlegroups.com
Even better than PyPy, would it be worthwhile to implement (parts of) xonsh using Cython? 

To use xonsh as the true login shell and also for running scripts everywhere, the performance difference might be noticeable on every tab keytroke (I think, benchmarking obviously needed). 

Anthony Scopatz

unread,
Jun 23, 2015, 12:41:32 PM6/23/15
to eskhool, xo...@googlegroups.com
Hi Anshuman!

Thanks for opening the issues and contributing. Sorry for the slow reply - (I am on a very long and very long overdue vacation, so my dev work is pretty close to zero for the moment ~_~. I think the other devs are in a similar place.)

To answer your questions, yes I do think that PyPy could speed up xonsh. I also think that Cython could speed it up, too.  These are ideas that are definitely in the "I'd like to play around with" bin.  However, it is sadly low on my priority list. So please, if anyone - yourself included - wants to go ahead and try alternative run times, please do!!

Personally, I don't notice a lot of lag.  I am on 2015 Macbook Air w/ Ubuntu.  Startup takes 0.1 - 0.2 seconds, which is barely noticeable (to me), and I have never noticed any problems with keystrokes. Memory and CPU usage are consistently peaked at 0.1%.  However, I totally understand that Python is much heavier than Bash, and this can be potentially noticeable on some hardware configurations. If there is anything in particular that you notice, please report it, and we'll look into it for sure!

Glad that we successfully picked your brain :).
Be Well
Anthony

--
You received this message because you are subscribed to the Google Groups "xonsh" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xonsh+un...@googlegroups.com.
To post to this group, send email to xo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xonsh/a43d6e0d-ad94-4c44-8780-91abb77d0218%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

eskhool

unread,
Jun 26, 2015, 9:34:33 AM6/26/15
to xo...@googlegroups.com, anshuman...@gmail.com
I'm just trying to pick the best problem to make time to tackle for xonsh. I am on a similar machine, a 2014 15" Macbook Retina pro (but not brave enough to run Ubuntu on it alas) but the pythonic lag is something I feel often. I'm sure it will be felt more on slower hardware and ubiquity will not hit if it can't be in the same ballpark as bash.

The immediate problem with pypy is that it doesn't support Python 3.4. Cython should but it'll immediately limit some of the fancier introspection and dynamic manipulation that python allows ( i may be wrong about that) but being compiled should give us near native speed. might be an interesting trade off. Maybe hive off the core of xonsh into a cython compiled module? some benchmarks are probably needed.

Glad you got your vacation ...some of us are also overdue (but for other reasons :( )

- Anshuman

Anthony Scopatz

unread,
Jul 11, 2015, 1:23:01 PM7/11/15
to eskhool, xo...@googlegroups.com
On Fri, Jun 26, 2015 at 8:34 AM eskhool <anshuman...@gmail.com> wrote:
I'm just trying to pick the best problem to make time to tackle for xonsh. I am on a similar machine, a 2014 15" Macbook Retina pro (but not brave enough to run Ubuntu on it alas) but the pythonic lag is something I feel often. I'm sure it will be felt more on slower hardware and ubiquity will not hit if it can't be in the same ballpark as bash.

Hi Anshuman,

Interesting.  I am sorry that you feel lag with it.... Have you done any timings?  Do you know where the lag is coming from?
 
The immediate problem with pypy is that it doesn't support Python 3.4. Cython should but it'll immediately limit some of the fancier introspection and dynamic manipulation that python allows ( i may be wrong about that) but being compiled should give us near native speed. might be an interesting trade off. Maybe hive off the core of xonsh into a cython compiled module? some benchmarks are probably needed.

Cython won't limit the introspection at all.  I think that this should be something that is enabled at build time if the user wants it.
 

Glad you got your vacation ...some of us are also overdue (but for other reasons :( )

Back from vacation now and getting back into the swing of things :)

Be Well
Anthony
 
Reply all
Reply to author
Forward
0 new messages