The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

Program speed from sd card
Message #1 Posted by Iqbal on 19 Sept 2009, 9:36 p.m.

I wrote some programs for the 50G that are stored in port :0: ( which was originally done to prevent people from copying programs). I just changed them to run straight from the sd card. The problem is that the program is much slower running from a 16mb sd card than the calculator, even though it's identical. Why is this? Is there anything that can be done to improve speed from sd card?

Edited: 19 Sept 2009, 11:20 p.m. after one or more responses were posted

      
Re: Program speed from sd card
Message #2 Posted by Raymond Del Tondo on 19 Sept 2009, 10:26 p.m.,
in response to message #1 by Iqbal

Quote:
I wrote some programs for the 59G that are stored in port :0: ( which was originally done to prevent people from copying programs). I just changed them to run straight from the sd card. The problem is that the program is much slower running from a 16mb sd card than the calculator, even though it's identical. Why is this? Is there anything that can be done to improve speed from sd card?
The SD card is an external device, and its contents have to be copied to main RAM first to run. Port0 objects are evaluated directly.
There may be tweaks to improve speed somehow, but the principle stays the same;-)

HTH

      
Re: Program speed from sd card
Message #3 Posted by Tim Wessman on 20 Sept 2009, 2:31 p.m.,
in response to message #1 by Iqbal

Why specifically do they need to be in port 0 and not 2? What type of program is it and how much external data is being access vs. entered locally?

Running directly off the SD card is not really a good way to do it for speed reasons.

TW

            
Re: Program speed from sd card
Message #4 Posted by Iqbal on 20 Sept 2009, 9:28 p.m.,
in response to message #3 by Tim Wessman

Originally, I wrote them for the 48G series. And to prevent anyone from transferring via IR, I stored all the modules in Port :0:. It was not impossible to transfer but very difficult having so many modules. I am using the same programs although I had to change a few to work properly on the 50G. I am a land surveyor and all the programs and related to land surveying. Thanks, for the feedback.

                  
Re: Program speed from sd card
Message #5 Posted by Tim Wessman on 21 Sept 2009, 11:17 a.m.,
in response to message #4 by Iqbal

Ok. I know a thing or two about land surveying software on the 50g. . . :-)

I assume all of the program is in userRPL since nothing else was specified. Feel free to correct me if needed.

Are you writing and accessing data (points or raw) from the SD card itself? If so, that is probably the largest speed hit. I'd recommend keeping data locally in HOME, and then writing it out to the SD card or port2 with some kind of backup routine. The rest of the commands should be organized into a library or a collection of libraries if you haven't done that yet.

That is what is going on with the surveying software I made. Basically, the program libraries reside in port2, and all variables are created in the hidden directory in HOME. The point database is stored in unused internal system RAM and is read in from the SD card using some C software. The only time it accesses the card is when loading or saving points, writing the RW5 info, saving a copy of current job/software settings, or accessing the code attribute file. In short, only times when speed isn't all that critical as it can take a second or two for some of the operations.

If that doesn't give you some ideas on what to do, or if you'd like some help with it, feel free to email me directly at timwessman_a_t_gmail.com


[ Return to Index | Top of Index ]

Go back to the main exhibit hall