sigil Posted February 4, 2010 Share Posted February 4, 2010 (edited) Lotus Notes question. I know there isn't much Lotus support on this forum, but I'm wondering if it's a problem with the way I'm using COM. I'm accessing LotusScript through COM to search through a NotesViewEntryCollection for documents that fit certain criteria. The collection will usually contain 400-700 entries. The search is very slow, it only scans about 5 or 6 entries per second. I'm using this: $entry=$entries.GetFirstEntry $count=$entries.Count for $c=1 to $count $entrydate=getentrydate($oSession,$entry) $subject=getentrysubject($entry) if criteria($entrydate,$subject) Then doAction($entry) $entry=$entries.GetNextEntry($entry) EndIf Next Is there a memory problem, am I handling the objects in the wrong way? I've heard about some things like "garbage collection," is that something else I should be doing? I also read about declaring object variables using Dim and so that I can set their type more specifically and make them more efficient that way, like the way I would in Visual Basic for example. How would I declare a variable to be of a certain type? Edited February 4, 2010 by sigil Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 4, 2010 Share Posted February 4, 2010 (edited) Is $entries a regular collection? If so, try: For $entry In $entries $entrydate = getentrydate($oSession,$entry) $subject = getentrysubject($entry) if criteria($entrydate,$subject) Then doAction($entry) Next Further isolation depends mostly on those UDFs, like getentrydate(). You could bracket each function with TimerInit() and TimerDiff() to see where all the time goes. Edited February 4, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now