Skip to content

Performance improvement#31

Merged
PonteIneptique merged 6 commits intomainfrom
feature/v1.0
Apr 14, 2026
Merged

Performance improvement#31
PonteIneptique merged 6 commits intomainfrom
feature/v1.0

Conversation

@PonteIneptique
Copy link
Copy Markdown
Member

No description provided.

PonteIneptique and others added 6 commits April 7, 2026 19:11
- dapytains/processor.py: fix typo "PE" → "EE" for Saxon EE edition detection
- dapytains/tei/document.py: eliminate duplicate PyXPathProcessor creation in
  is_traversing_xpath (now accepts an existing proc instead of building one),
  xpath_walk_step (reuses its local proc for the traversal check), and
  reconstruct_doc (removes the redundant get_xpath_proc call at the sibling-loop
  site); cache getchildren() result to avoid a double call
- dapytains/tei/citeStructure.py: replace O(n log n) per-comparison Saxon XPath
  evaluations in find_refs_from_branches with a single O(n) positional-key pass
  (counts all preceding element siblings, not just same-name ones, for correct
  document order across mixed-type children); remove cmp_to_key import
- tests/test_successive_calls.py: new — verifies processor-reuse stability for
  successive calls, interleaved get_passage/get_reffs, shared processors, and
  multiple Document instances in memory simultaneously (including CiteStructure)
- tests/test_parallel_app.py: new — spins up 2 Flask worker subprocesses
  (prefork model, each with its own JVM) and hammers them with concurrent HTTP
  requests to confirm correctness under parallel load

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@PonteIneptique PonteIneptique changed the title Feature/v1.0 Performance improvement Apr 14, 2026
@PonteIneptique PonteIneptique merged commit 14dae9f into main Apr 14, 2026
10 of 12 checks passed
@PonteIneptique PonteIneptique deleted the feature/v1.0 branch April 14, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant