It seems like Dynamics in a Primitive Command is much slower in Connect as compared to V8i.
While Dynamics is running I can hear the fan of my laptop spinning up to cool the processor, indicating heavy CPU activity. This is only when running Connect. Laptop is ThinkPad L580, running 64 bit Windows 10 Pro. 8Gb RAM.Graphics is Intel UHD Graphics 620. Driver is Intel, version 23.20.16.5018 - Driver Update to 26.20.100.7261 did not improve.
I am attaching a MVBA file to illustrate. Same problem in similar C# code. Typical response time is around 8 mSec in V8i and 180 mSec in Connect.
I have tested in MicroStation 10.13.1.1 and in OpenCitiesMap 10.4.0.42 - V8i version is 08.11.09.829
DynamicsTest.mvba
Hi Lars,
Lars MP said:It seems like Dynamics in a Primitive Command is much slower in Connect as compared to V8i.
Well, maybe, but probably not. At least there is no such proof.
Lars MP said:While Dynamics is running I can hear the fan of my laptop spinning up to cool the processor, indicating heavy CPU activity. This is only when running Connect.
This is evidence of V8i is different than CONNECT Edition (plus the code is not good). But nothing more.
Lars MP said:I am attaching a MVBA file to illustrate. Same problem in similar C# code. Typical response time is around 8 mSec in V8i and 180 mSec in Connect.
Sorry, but the code illustrates nothing in fact, only that it behaves differently in V8i and CE. But it's not dynamic display benchmark. One problem is to use VBA Time to do any milliseconds scale measurement, because it's not precise enough (but for this case, I guess it's acceptable ;-). More important reason is what Jon wrote too: The code is written as to be slow and the timer does not measure display, but also the element creation speed plus all (quite expensive) allocations and memory management.
So the only (but valuable) proof of the code is something is different in V8i and CE, but it's not clear what exactly and where the performance problem is.
Lars MP said:I have tested in MicroStation 10.13.1.1 and in OpenCitiesMap 10.4.0.42 - V8i version is 08.11.09.829
I did the same (used MicroStation V8i and CE U13.1) with own code (attached): It creates 50x50 grid and displays it in dynamic, implemented using performance efficient (standard) structure mentioned by Jon (finished just before Jon posted his answer): The whole structure is created once and only duplicated and moved in dynamic, moreover displayed as one cell element.
Average results:
So the problem is somewhere else, in element creation process or a communication with forms. It would require further testing, but it's something that should be reported and analyzed by Bentley.
With regards,
Jan
DynamicsTest_optimized.mvba
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thank You so much, Jan
Your suggestion, some as Jon's did the trick. My measument is now down at 2ms or lower
But still strange to me why my poor code was running 20-fold faster in V8i :-)
Kind regards, Lars M-P
Hi Lars.
Lars MP said:But still strange to me why my poor code was running 20-fold faster in V8i :-)
it's not strange. As I wrote, your code is "only" proof that "something is different", but it does not show that dynamic display is wrong.
Something is different, I assume element creation is implemented in a wrong (slow) way.
I agree, Jan. Something is different.
Dynamic display is fast once you have all the geometry prepared and only one single cell to be redrawn.
I have made a test to only create the geometry in memory without redrawing in Dynamics. Fairly quick in Connect, and it does not explain the difference.So, I am about to say that .Redraw in Dynamics has a delay compared to V8i.
Lars MP said:Fairly quick in Connect, and it does not explain the difference.
My measurement provides different results. When I measured how fast cell with 50x50 grid of shapes is created:
... that's a huge difference and I can imagine that with a calls inside dynamic display process it can lead to massive performance drop down.
Artur Goldsweer any idea, why the difference is big between V8i and CE VBA?
Hi Jan and Lars,
Thank you for all your above troubleshooting to get the information to this state. I have placed an internal request for review by development subject matter experts (SMEs) to review and provide input, or need for a defect.
Either I or Artur will follow up on this post as soon as we hear anything.
HTH,Bob