I have a program using the Metamorph API. I do an openapicp followed by an openmmapi. I then call several calls to setmmapi followed by a series of calls to getmmapi and infommapi. Everything works great until I have called setmmapi/getmmapi 5 or 6 times. The 6th call to setmmapi takes 3 to 4 seconds to complete and the cpu usage pegs at 100%. Any idea why this would be happening and what I can do to correct it?
metamorph performance issue
-
mark
- Site Admin
- Posts: 5519
- Joined: Tue Apr 25, 2000 6:56 pm
metamorph performance issue
It's a query protection mechanism within the API. It prevents poor programmers from getting away with it, among other things. But since we understand your app and why you are hitting it, here's how to turn it off. Call the function eqprepstr("ovrd"); at the beginning of your program. It will stick for as long as the program runs. There's no need to call it more than once within a given program run.
-
sbeavers
- Posts: 9
- Joined: Wed Jan 31, 2001 7:31 pm
metamorph performance issue
Thanks, that did the trick. What was that protecting me from?
-
mark
- Site Admin
- Posts: 5519
- Joined: Tue Apr 25, 2000 6:56 pm
metamorph performance issue
Calling setmmapi() unnecessarily.