Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Prontoscript code placement
This thread has 6 replies. Displaying all posts.
Post 1 made on Thursday February 7, 2008 at 20:42
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Ever feel real stupid because you missed something so obvious... well that was this AM when I got a note from the boys in Belgium

When I first started working with the pronto I decided to put all the common code at the activity level and all the device oriented code at the page level. That is okay at first glance. I then decided that the active page would be in a continuous loop (every 100 milisec) running a switch statement to perform actions in a very controlled manner. Much easier to debug when async events are queued and brought under control.

What I did not realize (until it was mentioned in a kind and forgiving manner) was that every function defined on a page would be reinitialized and defined every 100 milisec. What a time waster!!!

I proceeded to move every function defined on each page to the activity level, resolved any namespace issues and square the code away (not yet optimized).

I saw a two to threefold improvement in performance immediately.

Once I thought about it I realized it had to be that way based on the archtecture of the Pronto and it's GC algorithms. By having the activity level as the home of all the functions they only get defined when the activity level process executes which is when jumping from outside the activity to one of the activities pages.

The scroll wheel is now very usable. It is coded such that you have to leave it alone for one second before the action completes. While you are jogging it the elevator moves up and down in its shaft following the wheels motion and then when you stop it loads the window with the proper section of the data you were scrolling over.


No big loss, but the new Slimserver client is really exciting to use now!
Post 2 made on Thursday February 7, 2008 at 20:57
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,006
Exciting? Don't know about that one. But I bet it runs a helluva lot faster. LOL

Barry, I thought you knew that one. My bad.

I hit this problem when I thought about doing page queues like you were doing.

It was really not that big of a deal for me as I typically only use classes (includes javascript functions) and define instances of the class in variables stored at the activity-level.

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 3 made on Friday February 8, 2008 at 01:32
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
I am easily excited at my age. (:-). When doing a collage load (9 covers at 100x100 each) the just come in one after another with practically no delay. The scroll wheel is nice bcause as long as you keep it moving you can turn it CW or CCW and watch the slider elevator track the wheel. stop playing with it and the data (cover art) loads quickly and smoothly.

If you just move the cursor vertically in a long non resident list; when the cursor hits an edge (top or bottom) the system hiccups, reloads the next chunk from the server and continues.

When I get the time I will do prereads for cursor and page operations, but it makes no sense for scrolling as scrolling sort of mimics random access
Post 4 made on Friday February 8, 2008 at 17:34
jakob.sand
Long Time Member
Joined:
Posts:
December 2006
36
When do we see this new version :-) Today?
OP | Post 5 made on Friday February 8, 2008 at 18:20
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Goes out tonight. Just need to pack it up with its documentation. All those you have purchased a copy should get it by tomorrow early AM so you can play with it over the weekend
Post 6 made on Saturday February 9, 2008 at 11:55
randman
Long Time Member
Joined:
Posts:
June 2003
424
Another great tip, Barry! Thanks! Would be nice if there were a ProntoScript FAQ!
Post 7 made on Saturday February 9, 2008 at 12:28
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,006
If you run through the examples in the Dev Guide, you will find out many things about the behavior of the unit.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse