~kissiel/plainbox:optimizations

Last commit made on 2016-10-16
Get this branch:
git clone -b optimizations https://git.launchpad.net/~kissiel/plainbox
Only Maciej Kisielewski can upload to this branch. If you are Maciej Kisielewski please log in for upload directions.

Branch merges

Branch information

Name:
optimizations
Repository:
lp:~kissiel/plainbox

Recent commits

84e3b2c... by Maciej Kisielewski

commands:cmd_session: don't get_exporter_names() when not needed

So that SessionManager class is not instantiated, and no 'spooling-up' is
required.

This makes invocation of 'plainbox --version' soooo much faster (~4x faster)

Signed-off-by: Maciej Kisielewski <email address hidden>

b78fecf... by Maciej Kisielewski

unit: remove unnecessary interpolation

Signed-off-by: Maciej Kisielewski <email address hidden>

ace1c90... by Maciej Kisielewski

rfc822: run multi-line normalization only on multi-line values

This cuts ~10% of plainbox spool-up time.

Signed-off-by: Maciej Kisielewski <email address hidden>

c3855b7... by Maciej Kisielewski

session:state: keep a set of checksums of already added units

For a quicker "unit in unit_list" lookup. This replaces a 1M calls to unit's
__eq__ (which runs hashing) to a neglible thousands.

Signed-off-by: Maciej Kisielewski <email address hidden>

057ef99... by Maciej Kisielewski

session:test_manager: use JobDefinition as a spec for Mock

Instead of IJobDefinition, as it doesn't have the full interface of a real Job
unit.

Signed-off-by: Maciej Kisielewski <email address hidden>

4167dba... by Maciej Kisielewski

providers: properly generate whitelist patterns from test plan's include

Whitelist qualifiers are generated with a code like:
 for pattern in pattern_list
The pattern_list that was supplied was (in case of 'guessing whitlist from a
test plan') test_plan.include... which is a string!
That meant that str was treated like a list, and for longer include fields,
many thousands of those regex qualifiers were constructed. Aweful!

This patch repairs how those patterns are generated by parsing include field,
enveloping them with a historical ^ and $, and pushing them to the whitelist.
The result is 25% faster plainbox spool up.
Signed-off-by: Maciej Kisielewski <email address hidden>

d77a73c... by Maciej Kisielewski

state: defer recompute readiness till all units are added (adding whole prov)

There's no point in computing readiness every time new unit is added, not doing
so reduces plainbox startup with a typical set of jobs (~1k) by 15% \o/

Signed-off-by: Maciej Kisielewski <email address hidden>

1ab5a39... by Maciej Kisielewski

state: add recompute flag to add_unit

So clients of that function may choose whether they want to recompute job
readiness immediately.

Signed-off-by: Maciej Kisielewski <email address hidden>

1a42e45... by Maciej Kisielewski

qualifiers: cache compiled re qualifiers

For a typical set of providers (~1k of jobs) it gives ~5% wall time decrease
in parts that are always run on startup of any *box command, (e.g. even when
 invoking 'plainbox --version')

3dff46c... by PMR <pmr@pmr-lander>

Merge #308528 from ~sylvain-pineau/plainbox:ping_rtd