Skip to content
Snippets Groups Projects
  1. Nov 27, 2014
  2. Nov 26, 2014
  3. Nov 25, 2014
  4. Nov 21, 2014
    • Arseny Kapoulkine's avatar
      Fix node_declaration copying with empty name · 125aa550
      Arseny Kapoulkine authored
      node_copy_string relied on the fact that target node had an empty name and
      value. Normally this is a safe assumption (and a good one to make since it
      makes copying faster), however it was not checked and there was one case when
      it did not hold.
      
      Since we're reusing the logic for inserting nodes, newly inserted declaration
      nodes had the name set automatically to xml, which in our case violates the
      assumption and is counter-productive since we'll override the name right after
      setting it.
      
      For now the best solution is to do the same insertion manually - that results
      in some code duplication that we can refactor later (same logic is partially
      shared by _move variants anyway so on a level duplicating is not that bad).
      125aa550
    • Arseny Kapoulkine's avatar
      Refactor node type checks for attribute insertion · a0dc4681
      Arseny Kapoulkine authored
      Add allow_insert_attribute (similar to allow_insert_child).
      a0dc4681
  5. Nov 20, 2014
  6. Nov 18, 2014
  7. Nov 17, 2014
  8. Nov 07, 2014
    • Arseny Kapoulkine's avatar
      XPath: Partially inline xpath_node_set_raw::push_back · 4c57d6f6
      Arseny Kapoulkine authored
      Previously push_back implementation was too big to inline; now the common case
      (no realloc) is small and realloc variant is explicitly marked as no-inline.
      
      This is similar to xml_allocator::allocate_memory/allocate_memory_oob and
      makes some XPath queries 5% faster.
      4c57d6f6
    • Arseny Kapoulkine's avatar
      XPath: Only call apply_predicates if necessary · d854b021
      Arseny Kapoulkine authored
      In some cases constant overhead on step evaluation is important - i.e. for
      queries that evaluate a simple step in a predicate expression. Eliminating
      a redundant function call thus can prove worthwhile.
      
      This change makes some queries (e.g. //*[not(*)]) 4% faster.
      d854b021
  9. Nov 06, 2014
  10. Nov 05, 2014
  11. Nov 03, 2014
  12. Nov 02, 2014
  13. Nov 01, 2014
  14. Oct 29, 2014
  15. Oct 28, 2014
    • Arseny Kapoulkine's avatar
      Optimize node printing by using raw pointers · 6229138d
      Arseny Kapoulkine authored
      This lets us do fewer null pointer checks (making printing 2% faster with -O3)
      and removes a lot of function calls (making printing 20% faster with -O0).
      6229138d
    • Arseny Kapoulkine's avatar
      XPath: Optimize [position()=expr] and [last()] · c64d4820
      Arseny Kapoulkine authored
      To get more benefits from constant predicate/filter optimization we rewrite
      [position()=expr] predicates into [expr] for numeric expressions. Right now
      the rewrite is only for entire expressions - it may be beneficial to split
      complex expressions like [position()=constant and expr] into [constant][expr]
      but that is more complicated.
      
      last() does not depend on the node set contents so is "constant" as far as
      our optimization is concerned so we can evaluate it once.
      c64d4820
  16. Oct 26, 2014
    • Arseny Kapoulkine's avatar
      XPath: Only recognize numeric constant expressions · dbfe85a7
      Arseny Kapoulkine authored
      Numeric and boolean constant expressions in filters are different in that
      to evaluate numeric expressions we need a sorted order, but to evaluate
      boolean expressions we don't. The previously implemented optimization adds
      an extra sorting step for constant boolean filters that will be more expensive
      than redundant computations.
      
      Since constant booleans are sort of an edge case, don't do this optimization.
      This allows us to simplify apply_predicate_const to only handle numbers.
      dbfe85a7
    • Arseny Kapoulkine's avatar
      XPath: Unify ast_filter/ast_predicate structure · 11ce004e
      Arseny Kapoulkine authored
      Now expression is always _right for filter/predicate nodes to make optimize()
      simpler. Additionally we now use predicate metadata to make is_posinv_step()
      faster.
      
      This introduces a weak ordering dependency in rewrite rules to optimize() -
      classification has to be performed before other optimizations.
      11ce004e
Loading