OpenId() is slow, why?
Hi Community! I need your advice.
The method below is 6 times slower on production server than on developing machine:
ClassMethod runme4()
{
s cnt=615210
s st=$zh
for i=1:1:cnt {
s p=##class(digi.packet).%OpenId("packet||5237")
w:p="" "not found",!
k p
}
w $zh-st,!
}
BUT the server is 6 times faster if OpenId replaced with simple read of a large global (s p=^someLargeGlobal). Any ideas what makes OpenId so slow only on the server?
And another question: I wanted to profile the code with
Thanks!
Some details:
- The server is almost idle at the experiment time.
- The database is exactly same.
- Cache version is same (2017.2) but the server is Linux and dev pc is Windows.
- digi.packet is a regular
%Persistent class with nothing special