Theos PowerBasic Museum 2017

Archive => Discussion - Legacy Software (PBWIN 9.0+/PBCC 5.0+) => Topic started by: Edwin Knoppert on June 29, 2009, 01:39:35 PM

Title: ForEach
Post by: Edwin Knoppert on June 29, 2009, 01:39:35 PM
I have this 7.5MB xml file and has a node having 24161 child nodes.
I obtain the nodelist and have two choices, use Item() with index to obtain the item and it's value.
The 2nd is using the enum method.
Both result in the same 30 seconds to read all nodes.

is item() already optimized?
i never thought that was correct and one had to use the ienumerator for fastest results.

I am using a dispatch object for the nodes but i wrote an interface for the enumerator (invoke, -4 etc..).
This enum. obtains a variant for the interface and i make it a dispatch variable.

Suggestions?
Title: Re: ForEach
Post by: Edwin Knoppert on June 29, 2009, 01:49:05 PM
A simple loop does not eat time:

---------------------------
PowerBASIC
---------------------------
24161, .062
---------------------------
OK   
---------------------------

When i add this line:
Object Get oNode.Text To vText
It will take 20 seconds.
Title: Re: ForEach
Post by: Edwin Knoppert on June 29, 2009, 01:55:32 PM
I just used an interface for node and does not increase reading speed.