Giter Site home page Giter Site logo

Comments (11)

cs01 avatar cs01 commented on May 4, 2024 1

I don’t have the time to work on open source any more but if you submit a pr, @barisione or I can review it

from pygdbmi.

roar180 avatar roar180 commented on May 4, 2024

Hello, I concur.
I dont understand why the timeout value is actually the time spent for each command.
This makes the execution time for a script the worst timing, unless you tailor the timeout value for each and every command (if you happen to know this value for sure, or you would have to devise a retry mecanism on top)...

from pygdbmi.

cs01 avatar cs01 commented on May 4, 2024

I added this because oftentimes a valid response would be returned, but gdb had not finished writing all its responses. I get where you are coming from though. I will add a new keyword argument, return_on_first_response which will return as soon it has a response even if it hasn't timed out yet. Does that sound good?

from pygdbmi.

roar180 avatar roar180 commented on May 4, 2024

Well, I actually like the Unix behavior : a two level timeout.
The first one being when you have not received anything yet, the second one (time_to_check_for_additional_output_sec), much less, each time you receive new packets from gdb. Any reason why you did not implement it that way on Windows ?

from pygdbmi.

cs01 avatar cs01 commented on May 4, 2024

Oh, hmm. Are you both using windows? It's been a while since I added that but my guess is there was no technical reason it wasn't done. I don't use windows so I probably just forgot to add it. Would that be a good solution instead of return_on_first_response?

from pygdbmi.

roar180 avatar roar180 commented on May 4, 2024

Looks like, yes.
I like the 2 level timeout better, because I believe that allows to capture anything gdbmi might send after the done message (unless we are sure it is the last thing we should be expecting)

from pygdbmi.

H0bo avatar H0bo commented on May 4, 2024

Hello cs01! I'm using pygdbmi on windows and I would really like to cut down on waiting times. I implemented the same timeout mechanism as the unix codepath uses in my fork. Though I can't get all tests to succeed (only test_controller fails), but this was the case before I made any changes.
In my application the speedup is very big and everything is working.

from pygdbmi.

jhajdu avatar jhajdu commented on May 4, 2024

Hi,
Was the windows timeout issue resolved already?
Sorry but I couldn't find the resolution in the source (maybe it's just my bad).

Many thanks.

from pygdbmi.

H0bo avatar H0bo commented on May 4, 2024

Hey @cs01, did you consider including the changes?

from pygdbmi.

cs01 avatar cs01 commented on May 4, 2024

Oh sorry I didn't know this was blocked on me. I have no objection to it and would be happy to review a PR, but I am not able to make this change myself.

from pygdbmi.

Xtyll avatar Xtyll commented on May 4, 2024

Hello @cs01. I think your idea with return_on_first_response will extra useful. In the case when we sure that GDB will return only one reponse we able to use this approach. In my case it worked. With some haks I do it and tested. Works corerctly witl 1M iterations. Are you able to implement it soon? or better to do it in my side and open PR?

from pygdbmi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.