Skip to content
Snippets Groups Projects
  • Sean Bright's avatar
    1ad0fbc8
    config: Speed up ACO & sorcery initialization · 1ad0fbc8
    Sean Bright authored
    When starting Asterisk in the foreground, there is a perceptible delay
    when loading modules that use the ACO and sorcery config frameworks.
    For example, a lightly configured res_pjsip took 853ms to load on my
    VM.
    
    I tracked down the slowness to the XPath queries used to associate the
    relevant documentation with the config options. One improvement was
    adding a call to xmlXPathOrderDocElems after loading an XML document.
    From the libxml2 docs:
    
      Call this routine to speed up XPath computation on static documents.
    
    The second change was to remove recursive descent and wildcard
    operators from the XPath queries. After these changes, res_pjsip takes
    85ms to load on my VM and there is no longer a perceptible delay when
    starting Asterisk in the foreground.
    
    Change-Id: I45d457f1580e26bf5a2b0dab16e8e9ae46dcbd82
    1ad0fbc8
    History
    config: Speed up ACO & sorcery initialization
    Sean Bright authored
    When starting Asterisk in the foreground, there is a perceptible delay
    when loading modules that use the ACO and sorcery config frameworks.
    For example, a lightly configured res_pjsip took 853ms to load on my
    VM.
    
    I tracked down the slowness to the XPath queries used to associate the
    relevant documentation with the config options. One improvement was
    adding a call to xmlXPathOrderDocElems after loading an XML document.
    From the libxml2 docs:
    
      Call this routine to speed up XPath computation on static documents.
    
    The second change was to remove recursive descent and wildcard
    operators from the XPath queries. After these changes, res_pjsip takes
    85ms to load on my VM and there is no longer a perceptible delay when
    starting Asterisk in the foreground.
    
    Change-Id: I45d457f1580e26bf5a2b0dab16e8e9ae46dcbd82