Friday, October 07, 2005

High speed debugger

Wow, fasten your seat belts... the debugger has boosted a *LOT* in speed.

I didn't actually measure how much did it speed in a very good way, but with the latest changes, I got the following results for starting an application of mine:

In the previous way, it spent about 44 secs to load.
Now, it only took 5 (and usually it takes 2.5). So, it can almost be considered a 9 times faster debugger :-)

Well, this will be available in the next release (0.9.8.3), so, wait for it... probably next week it will be out.

Now, on to what was the major speed-up:

Pydev was setting the tracing function on any context it entered, even if it was nowhere near to a breakpoint. Now, it will only trace functions that have breakpoints near it (this currently means that it will trace any context in a file that has a breakpoint). And we only trace other contexts if we are in 'step' mode.

Pydev probably has other available speed ups, but there will probably be no fix that will speed it up as much as this change...

Cheers,

Fabio

2 comments:

  1. It's great to see Python support on Eclipse. I've been looking for an alternatives to Pythonwin and this looks like it.

    However, I must say that getting PyDev to run on Eclipse is the most frustrating installation experience I've had in many years. There is some sort of problem with Eclipse and/or PyDev. Somehow I got wedged into a situation where I could not get the PyDev properties to show up in Navigator\Project\Properties no matter what I did. After several hours of reading your notes, the big Eclipse book, installing, reinstalling, configuring, building simple Python projects, and trying, trying, to get it to run as Python code, I finally stumbled across a sequence that worked.

    The notes in your FAQ are pretty annoying to a new user having trouble. The easy, straightforward part of configuring the Python interpreter is spelled out in wonderful, explicit detail. The troublesome part, when the new user hits a glass wall and nothing happens, is covered by vague hand-waving. Here's the sequence that worked for me. I include specific detail that may not apply to others, but as a developer I find it easier to modify specific working instructions, than to guess what I need from vague recommendations.

    * Unzip eclipse-SDK-3.1.1-win32.zip to c:\
    * Unzip org.python.pydev.feature-0_9_8_3.zip to c:\
    * Double-click c:\eclipse\eclipse.exe
    * Set default workspace where you want it.
    * Close Welcome splash pane.
    * Select Resource perspective: Window\Open Perspective\Other...\Select Perspective\Resource.
    * Click OK.
    * Select Window\Preferences\PyDev\Interpreter - Python.
    * Click top New... button and enter Python path, e.g., c:\Python24\python.exe
    * Click OK.
    * Click File\New\Project...
    * Select Simple\Project Wizard
    * Click Next.
    * Enter Project Name, e.g. SimpleProj1.
    * Click Finish.
    * Click File\New...\File.
    * Enter File Name, e.g. Py1.py.
    * Click Finish.
    * Right-click SimpleProj1 in Navigator pane and select Properties.
    * Click PyDev-PYTHONPATH.
    * Click top pane "Add source folder" button.
    * /SimpleProj1 should already be selected. Click OK.
    * Click top pane "Add source folder" button.
    * Add path to source folder on disk, e.g., C:\Dev\eclipse\SimpleProj1.
    * Click OK.
    * Add some Python code to Py1.py:
    print 'Hello from eclipse and python."
    * Save.
    * Right-click on Py1.py in Navigator pane.
    * Select Run as\Python run.
    * A console window should appear showing output from the Python program.

    I think the problem I experienced resulted from my closing all the eclipse windows and working from a bare desktop when I started. I thought that would make things simpler; apparently not so.

    Anyway, thanks for your work in putting Python on Eclipse.

    Best,
    Jack Trainor

    ReplyDelete
  2. I agree... A begginers guide is something that really should be created... I think I'll start it from your example (and maybe refine it just a little bit).

    Cheers,

    Fabio

    ReplyDelete