Juan Hernandez has submitted this change and it was merged.
Change subject: restapi: optimize getUriBuilder
......................................................................
restapi: optimize getUriBuilder
- Whenever we needed to build a Uri we would create a new UriBuilder from
the passed in model. The structure of the builder is based on type of the
model. This patch instead of creating a new one from scratch each time,
caches the UriBuilder and returns a clone. Cloning the builder is much
faster than creating a new one from scratch. Using a cloned builder ensures
there are no concurrency issues associated with the builder.
Change-Id: I86221e8af24da28a7137c0cc0e7aec69943a65c5
Signed-off-by: Alexander Wels <awels(a)redhat.com>
---
M
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/LinkHelper.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendResource.java
2 files changed, 54 insertions(+), 13 deletions(-)
Approvals:
Juan Hernandez: Looks good to me, approved
Alexander Wels: Verified
--
To view, visit
http://gerrit.ovirt.org/37988
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I86221e8af24da28a7137c0cc0e7aec69943a65c5
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Alexander Wels <awels(a)redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server