← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1790195] [NEW] performance problems starting up nova process due to regex code

 

Public bug reported:

We noticed that nova process startup seems to take a long time.  It
looks like one major culprit is the regex code at
https://github.com/openstack/nova/blob/master/nova/api/validation/parameter_types.py

Sean K Mooney highlighted one possible culprit:

<sean-k-mooney> i dont really like this https://github.com/openstack/nova/blob/master/nova/api/validation/parameter_types.py#L128-L142
<sean-k-mooney> def _get_all_chars():
<sean-k-mooney>     for i in range(0xFFFF):
<sean-k-mooney>         yield six.unichr(i)
<sean-k-mooney> so that is got to loop 65535 times
<sean-k-mooney> *going too
<sean-k-mooney> and we call the function 17 times
<sean-k-mooney> so that 1.1 million callse to re.escape every time we load that module

** Affects: nova
     Importance: Undecided
     Assignee: sean mooney (sean-k-mooney)
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1790195

Title:
  performance problems starting up nova process due to regex code

Status in OpenStack Compute (nova):
  New

Bug description:
  We noticed that nova process startup seems to take a long time.  It
  looks like one major culprit is the regex code at
  https://github.com/openstack/nova/blob/master/nova/api/validation/parameter_types.py

  Sean K Mooney highlighted one possible culprit:

  <sean-k-mooney> i dont really like this https://github.com/openstack/nova/blob/master/nova/api/validation/parameter_types.py#L128-L142
  <sean-k-mooney> def _get_all_chars():
  <sean-k-mooney>     for i in range(0xFFFF):
  <sean-k-mooney>         yield six.unichr(i)
  <sean-k-mooney> so that is got to loop 65535 times
  <sean-k-mooney> *going too
  <sean-k-mooney> and we call the function 17 times
  <sean-k-mooney> so that 1.1 million callse to re.escape every time we load that module

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1790195/+subscriptions


Follow ups