Hi All,

I've noticed that domain listing become too long in new releases, at least it related with "listDomains" command. Comparing between 4.5 and 4.8, 4.9 releases (near 200 domains in list):


4.5.1:
# time cloudmonkey list domains filter=name | grep name | wc -l
212
real    0m0.804s
user    0m0.257s
sys    0m0.059s


4.8.0.1 and 4.9:
# time cloudmonkey list domains filter=name | grep name | wc -l
203
real    0m11.478s
user    0m0.203s
sys    0m0.047s

Less that 1 second in 4.5 and near 10 seconds since 4.8. This is not Cloudmonkey issue, same bug can be reproduced via GUI, when you are trying open search form in Instances, domain list is empty for ~10sec, that is confusing users. Screenshot: https://s29.postimg.org/66d7le9gn/domain_bug.png. After small investigation I found that DB query finished almost immediately, but problem in this loop and call "ApiDBUtils.newDomainResponse", it consume to much time for each domain (4.9.2.0 version): https://github.com/apache/cloudstack/blob/4.9.2.0/server/src/com/cloud/api/query/ViewResponseHelper.java#L353

Any ideas how to fix this correctly?


Best regards,
Dmytro

Reply via email to