I have as little VBA code as I can get away with.
The VBA code sets the Module Context depending on the value of a PI Tag (ie. If current Grade is "X", set module context = "X".) From everything I can figure out in the code, the ContextResolver takes about 100ms to resolve each tag on the display. Hence, it is not a noticeable problem when there are only 10 tags or so, but its very obvious when there are 200 tags.
There is also code to loop through all the MultiState symbols in the Symbols collection and reset the limits of each multistate as required. This routine works correctly and is reasonably quick, (but it has problems because it is triggered before the Context resolver has finished properly, but that's a different story) and code to update a trend symbol. In total maybe 150 lines of VBA code
The end user has PB version 3.0.15.7, but I have version 3.2.0.0 and the problem is the same on both versions.
No, the end user does not have AF, so I cant get round the issue by migrating away from MDB
Assuming we have no real network issues is a big assumption. We already suspect the performance of the network (or at least the connection between PI clients & the Server) as it takes quite some considerable time to load large quantities of trend data - ( to the point where some OSI guys have commented "Hmm, it shouldn't take that long. I wonder whats wrong", before wandering off onto the next issue. )
Everything I can see points to the context resolver being horribly inefficient, but "why" is a different question.