Live data from Hacker News

Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

github.com

21–30 of 38 posts

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#21
post #16
post #4

Two other profilers that also let you spy on a running Python program: - py-spy: https://github.com/benfred/py-spy (written in Rust) - pyflame: https://github.com/uber-archive/pyflame (C++, seems to be not maintained anymore) The "no performance cost" thing is interesting: my experience writing a similar profiler is that there are a couple of things that can affect performance a little bit: 1. You have to make a lot…

>you're likely to win the race, because C is faster than Python Heh, so the only reason there's "no performance cost" is the enormous performance cost of using Python in the first place?

Yes, enormous performance cost in CPU hours and enormous performance gain in human life hours. hehe

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#22

Love the TUI! Which library did you use for it?

I wrote a blog post about the technology behind the TUI https://p403n1x87.github.io/the-austin-tui-way-to-resourcefu... It's a custom resource-based framework that uses curses as back-end.

This looks really interesting - thanks!

One question: in the first XML example (minimal-view.xml), why is the root element a but then the last line ends it with ? Is it a typo or is there something else going on?

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#25

Earlier quoted context omitted.

I wrote a blog post about the technology behind the TUI https://p403n1x87.github.io/the-austin-tui-way-to-resourcefu... It's a custom resource-based framework that uses curses as back-end.

This looks really interesting - thanks! One question: in the first XML example (minimal-view.xml), why is the root element a but then the last line ends it with ? Is it a typo or is there something else going on?

Ah! Totally a typo, thanks for that :)

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#26
post #16

Earlier quoted context omitted.

>you're likely to win the race, because C is faster than Python Heh, so the only reason there's "no performance cost" is the enormous performance cost of using Python in the first place?

Running Python is not a performance cost. The meaning behind "no performance cost" is that a tool like this is unlikely going to impact the performance of the application that is being profiled. The fact that Python is not a "fast" programming language is then a different matter.

The point is that it's only possible in the first place because Python leaves so much performance on the table. You can't snoop inside a C++ program in the same way - unless you throw a bunch of sleep() calls everywhere to slow it down, and then hey presto you can!

Or, to put it another way, taking Python from 500x SlowerThanCee to 501x is "negligible", but taking C from 1x to 2x slower isn't.

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#27
post #26

Earlier quoted context omitted.

Running Python is not a performance cost. The meaning behind "no performance cost" is that a tool like this is unlikely going to impact the performance of the application that is being profiled. The fact that Python is not a "fast" programming language is then a different matter.

The point is that it's only possible in the first place because Python leaves so much performance on the table. You can't snoop inside a C++ program in the same way - unless you throw a bunch of sleep() calls everywhere to slow it down, and then hey presto you can! Or, to put it another way, taking Python from 500x SlowerThanCee to 501x is "negligible", but taking C from 1x to 2x slower isn't.

true that

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#28

What’s the difference between a TUI and a CLI? (Also my preferred TUI acronym is tactile user interface).

Back in the MS-DOS days a TUI would be something done with Turbo Vision or Clipper, simulating GUIs with text.

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#29
post #16
post #4

Two other profilers that also let you spy on a running Python program: - py-spy: https://github.com/benfred/py-spy (written in Rust) - pyflame: https://github.com/uber-archive/pyflame (C++, seems to be not maintained anymore) The "no performance cost" thing is interesting: my experience writing a similar profiler is that there are a couple of things that can affect performance a little bit: 1. You have to make a lot…

>you're likely to win the race, because C is faster than Python Heh, so the only reason there's "no performance cost" is the enormous performance cost of using Python in the first place?

Correct.

Re: Show HN: Austin-Tui – Spy inside a running Python program at no performance cost

#30
post #16

Earlier quoted context omitted.

>you're likely to win the race, because C is faster than Python Heh, so the only reason there's "no performance cost" is the enormous performance cost of using Python in the first place?

Yes, enormous performance cost in CPU hours and enormous performance gain in human life hours. hehe

I seriously, seriously beg to differ.
Post reply on HN