[jawsscripts] Re: Slight differences after reload?

  • From: "Steve Spamer" <stevespamer68@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Sun, 10 Dec 2017 22:04:12 -0000

Hey Jim, thanks for the info, improvements are being made, so I'll keep 
experimenting lol.
Here's the trace code, provided by Bob a while ago.  It's a great tool to 
have,so thanks again Bob.

Globals
String gTraceData

Script EnableTrace ()
     AddHook (HK_EVENT_TRACE, "TracerFunc")
     SayString ("Trace Enabled")
     Let gTraceData = ""
EndScript

Script DisableTrace ()
     RemoveHook (HK_EVENT_TRACE, "TracerFunc")
     SayString ("TraceDisabled")
     CopyToClipboard (gTraceData)
EndScript

Function TracerFunc (string sPath, string sFuncName)
     Let gTraceData = gTraceData + "\r\n" + sFuncName
EndFunction

-----Original Message----- 
From: Snowman
Sent: Sunday, December 10, 2017 9:16 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Slight differences after reload?

Hey Steve,
I'd love to get ahold of that event trapping code.  I thought I had this,
but can't seem to find it.  It is very useful to get a list of what jaws
events fired during a particular interval.
This list of events, of course, is just the stuff that jaws knew about.  It
clearly won't capture other things that are happening in windows itself.
And, it shows what JAWS events fired.  but, it doesn't show what code ran as
a result of that event.  For example, a jaws event handler that
conditionally decides to run some other function.
Maybe this tool can be enhanced to service the event, start the timer, call
the event handler, and then capture the elapsed time upon return, and record
it along with the event name.



+--------------------------------------------------------------------------+
Listen to The Snowman on MushroomFM.com, Saturday evenings, 8PM Eastern
time.
60's and 70's tunes, and gently conservative talk.

----- Original Message ----- 
From: "Steve Spamer" <stevespamer68@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Sunday, December 10, 2017 11:08 AM
Subject: [jawsscripts] Re: Slight differences after reload?


Thanks Tim and Jonathan, but this discrepancy is with the same test. Only
difference is, 1 is when the scrits are already loaded and 1 with loading
the scripts while this window is open.  I used the same key press (tab) to
gather that info.

So, as there was just 1 press of the tab between capturing the functions,
just wondering why the difference in performance? Steve.

-----Original Message----- 
From: Jonathan Cohn
Sent: Sunday, December 10, 2017 2:24 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Slight differences after reload?

I believe that the WindowDestroyEvent is a response to the application
requesting a window be destroyed. Creating and destroying windows is a
fairly expensive process and it might even be that when a window is
destroyed if at the application or any monitoring application has a object
associated with the event Windows might delay application responses until
associated threads or processes have freed their related objects. Unless you
have a object variable associated with the window or one of its internal
controls you are probably not the culprit of the slowdown. I would also
expect that sighted  users would encounter the pause also.

Best wishes,

Jonathan Cohn



On Dec 10, 2017, at 7:13 AM, Steve Spamer <stevespamer68@xxxxxxxxx> wrote:

Hi.  I’m trying to refine and optimize some scripts and just wondering
if there are specific areas where I should concentrate?
I am very happy with how things are going so far, but I’ve noticed one
thing that is intriguing me.
In one particular window I’m getting a few MS delay before a control is
spoken.  This is negligible, but if I unload Jaws and reload, the
performance is instantanious, but it doesn’t last if I exit and reenter.
Now, I’ve run the trace code once sent by Bob, and even those there
maybe nothing in it, there is one extra entry in the slightly slower
running functions list.
It’s an extra WindowDestroyedEvent sandwiched between 2 key pressed
events at the bottom.
I don’t have this function in the code and I can’t see why this would
affect things, the list of both scenarios is belowe.

When the window is opened and scripts are loaded.
keypressedevent
keymapchangedevent
shouldinvalidateocrdataonfocuschange
focuschangedeventex
tutormessageevent
windowdestroyedevent
keyboardlanguagechangedevent
keypressedevent
windowdestroyedevent
keypressedevent
keymapchangedevent

When reloading and getting instantanious performance:

keypressedevent
keymapchangedevent
shouldinvalidateocrdataonfocuschange
focuschangedeventex
tutormessageevent
windowdestroyedevent
keyboardlanguagechangedevent
keypressedevent
keypressedevent
keymapchangedevent


Anyway, there must be something going on to show this behaviour, so if
anyone has any ideas/tips, they would be greatfully accepted. best steve.
Follow me on Twitter: @stevesax123
Visit the samplitude Access website. Jaws scripts for pro recording with
Samplitude in Windows: www.samplitudeaccess.org.uk
__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts



__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts ;

__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: