Comments (5)
I think there could absolutely be a speed up in the non-io bound stuff. Rust is way faster than Python. IIRC the unit tests ensure the parsing is done in o(n) time. If they don’t currently they definitely used to.
There was a pull request a while back where large strings were parsed more quickly by taking advantage of some implementation details of Python.
Anyway, thanks for sharing and good luck on your finals.
from pygdbmi.
Thanks for sharing, that’s awesome! I considered doing this to learn rust but never found the time.
There should be a way to call rust from Python. I would love to call into your parser from pygdbmi, since parsing with Python can be a bottleneck.
from pygdbmi.
I can look into that. I'm currently technically supposed to be doing finals, so I can't promise promptness :)
My current architecture has a worker that reads from stderr/stdout and also from a channel of messages to send to gdb over stdin. Then there's a frontend that takes commands from the user and sends them to the worker over the channel, and receives the matching replies back when worker gets them. So the actual io is single threaded, but you can send a command while waiting for the result of another (unless it's a console command).
In theory I think that makes sense, but I haven't tried it on any real world data yet. I'm definitely interested if you have any good ideas for benchmarks/what's been a performance issue for you.
I think it's be pretty easy to write python bindings for the parser bit, since it's a synchronous function that takes a string a returns a simple-ish type. In theory it seems possible to call async rust code from python, so we could also build that.
I noticed in another issue you were considering rewriting the backend server. It might be easier for me to write a Rust server frontend than to have python sit in front of it. On the other hand you might prefer more of the code to be in a language you're comfortable with.
What do you think?
from pygdbmi.
If I’m being honest with myself, I don’t really have the time to devote to these projects (pygdbmi and gdbgui) other than maintenance. And I’d be hesitant to adopt any major rewrite since the projects are pretty complex and are stable. I am excited at the idea of an ffi into Rust, but it’s probably best to just leave it alone. Even if it were working, does installation become an issue? I’m not sure if the person installing it will need to be able to compile rust for their platform or if it can be prebuilt.
If there were to be some integration, i would only be interested in the parsing part, not the subprocess management part.
When you say backend server, are you talking about for gdbgui?
from pygdbmi.
That all makes sense. I doubt there'd be a huge speedup anyway since it's io bound. Feel free to close this issue.
from pygdbmi.
Related Issues (20)
- pygdbmi is now packaged for Fedora HOT 1
- Support for Intel's MPI debugging HOT 2
- Add ability to wait (with timeout) for the (gdb) "prompt".
- Slow time response with pipes (Windows) HOT 5
- IoManager._get_responses_windows self.stdout.readline() stuck HOT 2
- Incompatible behavior in GDB command line and pygdbmi HOT 2
- IoManager._get_responses_windows mangles token when reading from stdout
- Escapes in MI error records are mangled HOT 3
- Payload for textual messages not unescaped
- get_gdb_response doesn't parse tab char correctly HOT 6
- String parsing regression with v0.10.0.2 HOT 6
- GdbController cannot recognize window short path of gdb executable HOT 1
- "GdbTimeoutError" during '-symbol-info-variables' command HOT 1
- README.md - AttributeError: 'GdbController' object has no attribute 'get_subprocess_cmd' HOT 1
- Consider using a real language parser to parse MI output HOT 1
- Some responses dropped while debugging ARM microcontroller
- -break-insert * address not supported HOT 1
- Documentation published to https://cs01.github.io/pygdbmi/ is out of date
- Missing send_signal_to_gdb() and interrupt_gdb() of GdbController
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygdbmi.