[Pythonmac-SIG] Re: MacPython 2.2.2 final candidate

Alexandre Parenteau aparente@adobe.com
Wed, 30 Oct 2002 11:05:15 -0800


Hi Chris,

I have the same problem on OSX SMP, so here is what I do (gusiconfig.cpp) :

static void
PyMac_GUSISpin(bool wait)
{
    static Boolean    inForeground = true;
//    int        maxsleep = 6;    /* 6 ticks is "normal" sleeptime */
    int        maxsleep = 1;    /* 6 is to slooooow on OSX SMP */

    if (PyMac_ConsoleIsDead) return;

    if ( !wait )
        maxsleep = 0;

    PyMac_DoYield(maxsleep, 0); /* XXXX or is it safe to call python here?
*/
}

I changed maxsleep to 1 and it works much better for me. I've been running
this for 1 year or so.

I think the fundamental problem is GUSI yielding too much on OSX.

Alex.

> Neil Mayhew wrote:
>> I tried 2.2.2 on my dual-processor G4 today and re-encountered the strange
>> slowdown that I reported before, when starting any of the Python apps
>> (EditPreferences, PythonInterpreter and Python IDE).
> 
> Can you give me a little more detail on what the problem is, so I can
> test it out on my dual G4 as well?
> 
> -Chris

-- 
Alexandre Parenteau
Computer Scientist
Core Technologies, AGM
Adobe Systems, Inc.
408-536-6166