dhopkins wrote on Nov 13
th, 2007 at 4:30pm:
What I'm asking is, is there a list of techniques or tricks to optimize and speed up sbasic programs? Like which commands can be substituted out for faster ones. Which variable types or comparisions slow down processing (for example, comparing intergers or strings). that sort of stuff.
Yes. It's a long list and some of the items on it are very specific. I'll throw out some of the basics:
1. Variables are faster than elements.
2. Ints and Doubles are faster than Strings
3. Don't do anything more than once.
4. #3 especially applies to X commands.
5. If you are doing multiple XLookups to the same record, use @XLookupSourceList instead.
6. If you are using @XLookupR, use XResultSet instead.
7. If you are using XPost, use XResultSet instead.
8. Split is faster than @AccessStringArray.
9. Write less code.
10. Don't run your code more often that necessary. Use the proper events and conditional checks.
It's difficult to offer further advice without seeing what is slowing you down. Code optimization is all about the specifics.