Hi Wolfgang,
Ok, sorry for the delay. Let me break down your example:
Laptop used for test: Dell XPS M1710, Intel Core 2 T7600, 2.33 Ghz, 2GB Ram,
NVIDIA GeForce Go 7950 GTX
1) AnalysisWindow AN_400
400 Alphanumeric objects
AlphaNumeric refresh rate set: 2/Sec.
Total Aw update rate: 64
Issues/Comment: None
2) AnalysisWindow one_dyn_1400
1400 ActiveX Text objects
ActiveX text refresh rate set to: As fast as possible (0)
Total Aw update rate: 1-5
Issues/Comments:
By default, all ActiveX objects are set to refresh at a rate of "0". See
property "UpdateRate". Yes, this is a little confusing to note that the
AlphaNumeric display defaults to 2 updates per second. To make this
experiment close to the previous, I set their update to "2" (stopped AW,
rope selected all Ax Text displays, right click->Properties, set UpdateRate
to 2, close, restart AW). After modification: Total Aw update rate: 15 - 40
but erratic. I would imagine this would be smoother with actual data (vs
simulated equation). Also note that we've increased the number of displays
be a factor of 3.5. That is certainly going to make a difference.
3) AnalysisWindow five_dyn_1400
1400 ActiveX text objects
ActiveX text refresh rate set to: As fast as possible (0)
Total Aw update rate: 0-10
Issues/Comments:
Again, same issue as above. All UpdateRate properties set to "0". After
resetting them to 2, I got around 1-15 updates per second, but again it was
very erradic. As I noted earlier, the simulated equation takes some time to
process. If you want to eliminate that from the equation, try repeating the
experiment with real (live) data.
Ok, now let's get back to the issues at hand.
> I tried to find the bottleneck, but it seems to be the number of test
> objects on the window. It did help a little bit to set the Update Rate
> of the individual TEXT Object.
>
> To test the performance with different nubers of text objects and
> different numbers of dynamics per test object I build a config file
> "pfConfig.DisplayUpdates.config". You can find it here at
> "Dateien" (might be files or whatever in your language). Try it and
> give me a hint how to speed it up.
Yes certainly, the total number of ActiveX text objects on the screen at
once certain does have a factor in update rate. The number of displays, how
fast the value changes, the number of individual dynamics set up on each
display, the sample rate of the parameter, the complexity of the derived
equation, and many other factors have effects as well.
On the most complex AW (five_dyn_1400), if I decrease the amount of ActiveX
text objects to 700 and set their update rate to 2, I'm getting around 15 to
39 updates a second. Again, this update is rather erratic because of the
derived equation being calculated in PostTest. If this were actual data, I
would expect it to be much smoother.
Having said all of this, 1400 text objects on the screen simultaneously is a
large amount (larger than usual). I think the best technique might be to
lower this amount down and split it up between individual pages using the
"DisplayFolder". You can probably get 500 text objects on each "Tab" and
then comfortably switch between the tabs when needed.
As for possible optimizations, let me tell you what's going on under the
hood for ActiveX text objects:
1) The Text object updates at the rate specified by the "UpdateRate"
property. The lower this number is, the faster the overall update rate....
but obviously you can't go much lower than 1 or maybe 0.5?
2) The Text object only updates if the value changed from the last draw. You
mentioned that your values don't update very frequently. If this is so, then
the entire cost can be attributed to data access.
3) The Dynamic system is only run when the Text object updates. In other
words, if you create a custom function to calculate the text conversion,
you'll be forced to do so at the "sample rate" of the parameter. This is
most likely a lot higher than the actual refresh rate so I'm not sure that
would be advisable for performance reasons.
4) Although you are using TableLookup for your Dynamics, you only have 2
items in your table. As you might have discovered, it might actually be
faster with a non table lookup in this situation. In the end, I don't think
this will have much effect on the outcome.
Now let's go to the comparison with the AlphaTable:
5) The ActiveX text object is much more complex than the AlphaTable. It has
an entirely different interface in order to get data into the display (i.e.
via the Microsoft Dispatch property interface). The data is actually being
"pushed" from the outside into each individual property. This interface is a
lot more flexible because each minute detail of the Text object can be
driven with data/dynamics, but take a lot more processing power. The
AlphaTable pulls the data directly from our data interface (parameter) and
draws it directly to the screen (a lot quicker but less flexible).
6) The AlphaTable can contain many displays within it's boundary. In your
example, you have 100 text objects in 16 AlphaTables. Compare this to 1400
individual ActiveX displays. In essence, we only have 16 displays with 100
parameters attached. If you had 1400 AlphaNumeric displays, I would imagine
the rate would be closer to the ActiveX example. Again, the total number of
simultaneous displays on the screen does dictate the processing
requirements. Each display must be processed on the screen every update
cycle. The more displays, the more time it will take (there is a fixed
processing cost per display).
There are also other pitfalls. If the display rate drops below 1-2 updates
per second, you might be incurring extra cost for what we call a "blocked
request". This is basically a issue with the data caching prediction system
because of the number of parameters. The next time you run in "real time",
please open the Performance Window and look at the "Blocked Requests"
number. Is it growing? If so, this is another reason for some speed loss.
At this point in time, I think my only suggestion is to stick with the
AlphaTable for a massive number of parameters. Looks like you already
figured this out on your own ;) If you want to use individual ActiveX text
displays, try and limit the number of simultaneous displays (as mentioned
earlier). Try splitting them into "N" tabs on the DisplayFolder.
Any comments?
Jim