Notifications slowing system
Posted: Thu Oct 17, 2013 5:03 pm
I have a list box control on a form, that I am using to show a list of products (that need to have their price updated because the cost has increased or whatever).
I am using notifications to update the list box as events happen, if the user has the form open.
In my development system everything works perfectly, but on the clients live database (about 100Gb system, 30 users running thin-client) these events are causing the users system to 'hang' until it's finished the events notifications.
The 'hanging' is not really noticeable when doing tests at night time after the users have logged out.
I thought notifications occurred outside the node that code is running in, so the user should be able to continue using the system while the notifications happen in the background.
Any ideas on how to remove the hanging?
Thanks,
John
My setup:
I have used beginNotification on the control, specifying the currently logged in User object and an event number.
eg. beginNotification(app.myCurrentUser, 6004, Response_Continuous, 0);
The control has a userNotify method that calls a method to rebuild the list on the control.
When a price event occurs I call a causeEvent method.
eg. oUser.causeEvent(6004, false, oUser);
Since a single price change can cause multiple events I cause each event as 'non-immediate', then run a begin/commit transaction after they are all banked up.
eg. foreach oUser in oGroup.allMembers discreteLock do
oUser.causeEvent(6004, false, oUser);
oUser.causeEvent(6012, false, oUser);
endforeach;
if not process.isInTransactionState() then
beginTransaction;
commitTransaction;
endif;
I am using notifications to update the list box as events happen, if the user has the form open.
In my development system everything works perfectly, but on the clients live database (about 100Gb system, 30 users running thin-client) these events are causing the users system to 'hang' until it's finished the events notifications.
The 'hanging' is not really noticeable when doing tests at night time after the users have logged out.
I thought notifications occurred outside the node that code is running in, so the user should be able to continue using the system while the notifications happen in the background.
Any ideas on how to remove the hanging?
Thanks,
John
My setup:
I have used beginNotification on the control, specifying the currently logged in User object and an event number.
eg. beginNotification(app.myCurrentUser, 6004, Response_Continuous, 0);
The control has a userNotify method that calls a method to rebuild the list on the control.
When a price event occurs I call a causeEvent method.
eg. oUser.causeEvent(6004, false, oUser);
Since a single price change can cause multiple events I cause each event as 'non-immediate', then run a begin/commit transaction after they are all banked up.
eg. foreach oUser in oGroup.allMembers discreteLock do
oUser.causeEvent(6004, false, oUser);
oUser.causeEvent(6012, false, oUser);
endforeach;
if not process.isInTransactionState() then
beginTransaction;
commitTransaction;
endif;