Nir Soffer has posted comments on this change.
Change subject: schedule: Introduce scheduling library
......................................................................
Patch Set 12:
This version includes few optimizations based on profiling done in http://gerrit.ovirt.org/30987.
- Drop the useless user wrapper around a scheduled call. Now we create one object per call, and return it to the user to allow canceling.
- Keep calls in tuple (dedaline, call), which makes heappush faster, since it does not have to invoke ScheduledCall.__cmp__ millions of times
- Wakeup scheduler only if scheduled call was scheduled first. There is no reason to wake up the scheduler in other cases
- Drop canceled calls when popping out expired calls, previouly were returned in the list of expired calls, and were executed (noop).
- Remove deadline from ScheduledCall, as the deadline is stored in the tuple
- Use __slots__ in ScheduledCall to minimize memory usage
--
To view, visit
http://gerrit.ovirt.org/29607
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3764806d93bd37c3b5924080eb5ae4d29e4f4e0
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer
nsoffer@redhat.com
Gerrit-Reviewer: Adam Litke
alitke@redhat.com
Gerrit-Reviewer: Allon Mureinik
amureini@redhat.com
Gerrit-Reviewer: Antoni Segura Puimedon
asegurap@redhat.com
Gerrit-Reviewer: Dan Kenigsberg
danken@redhat.com
Gerrit-Reviewer: Federico Simoncelli
fsimonce@redhat.com
Gerrit-Reviewer: Francesco Romani
fromani@redhat.com
Gerrit-Reviewer: Martin Sivák
msivak@redhat.com
Gerrit-Reviewer: Michal Skrivanek
michal.skrivanek@redhat.com
Gerrit-Reviewer: Nir Soffer
nsoffer@redhat.com
Gerrit-Reviewer: Saggi Mizrahi
smizrahi@redhat.com
Gerrit-Reviewer: Yoav Kleinberger
ykleinbe@redhat.com
Gerrit-Reviewer: automation@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No