Project

Profile

Help

Bug #4201

closed

Missed optimization opportunity: conditional sorting

Added by Michael Kay about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2019-04-19
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

Certain functions and operators such as exists(), sum(), "=", do not require the operand(s) to be in any particular order; the optimizer therefore attempts to remove any unnecessary sorting into document order for such operands.

If the operand is a ConditionalSorter, which is designed to sort expressions such as $var/items only when $var is not a singleton, then the ConditionalSorter is not eliminated by this step.

(Found during investigation of performance bug #4198)

Please register to edit this issue

Also available in: Atom PDF