OSX vs debugprofilestop() and its impact on the scanner
  • TarretteTarrette January 2012
    I've run into problems with addons that use debugprofilestop() on OSX, including Auctioneer. I'm a little puzzled by what I see.

    On the windows client, debugprofilestop() returns milliseconds. It looks like on OSX it returns floating point seconds, exactly like GetTime() does.

    I've had some success and improvements in cpu-intensive programs buy fixing the 'factor of 1000'. eg: in CoreScan.lua I've tried things like:
    if IsMacClient() then
    processingTime = processingTime / 1000.0
    end

    Other addons have foolishly done things like "function local_GetTime() return debugprofilestop() / 1000 end" - making the /1000 be conditional on not IsMacClient() tends to improve things considerably.

    I can see that a debugprofilestart() will reset the counter back to zero. But what I don't know is whether debugprofilestop() is cached on OSX across a frame update just like GetTime() is.

    I'm asking here because there's some hints in the issue tracker that there's out-of-band discussions going on somewhere that I haven't found yet. I was wondering what the state of thinking on the subject was, and whether this sort of change is appropriate to slip into Auctioneer as well?
  • dineshdinesh January 2012
    PR Manager
    bryksys and/or mikk will probably need to weigh in.
  • TarretteTarrette January 2012
    As an example: "/dump GetTime(), debugprofilestop(), IsMacClient()" on a mac yields:

    Dump: value=GetTime(), debugprofilestop(), IsMacClient()
    [1]=274754.853
    [2]=274754.944
    [3]=1

    On windows, the [1] is larger by three orders of magnitude.
  • TarretteTarrette February 2012
    This appears to have changed again in 4.3.2. After the patch, I see on OSX:
    [1]=346322.873
    [2]=346322004.088
    [3]=1
  • MikkMikk February 2012
    Core Developer
    It would seem that no osx specific stuff is needed anymore then.
  • ccoxccox February 2012
    Core Developer
    Pre 4.3.2 I got 1 fps during scan.
    Post 4.3.2 I get 40-80 fps during a scan.
  • brykrysbrykrys February 2012
    Core Developer
    The 1fps came from a backup timer based on time() - we installed that because we couldn't find out what was causing the problem at the time.

    Let's hope 4.3.2 has fixed it for everyone though.

    By the way, tried GetTime() again to see if Blizzard had reverted their change in 4.3.2 - no such luck :(
Privacy · Advertising
Norganna's AddOns Network · World Of Minecraft · WoM Realms · Auctioneer Addon · Gatherer Addon · Addon Forums · RDRCT