Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERFORMANCE: window sorting #144

Closed
jacoscaz opened this issue Oct 24, 2021 · 1 comment
Closed

PERFORMANCE: window sorting #144

jacoscaz opened this issue Oct 24, 2021 · 1 comment

Comments

@jacoscaz
Copy link
Owner

Although the current sorting mechanism seems to be reasonably fast already, there's an optimization that could make it even faster.

As it stands today, any difference between the requested order and the order provided by the selected index leads to a complete re-ordering of results. However, there are cases in which partial re-ordering would be a better pick. For example, a requested ordering of ['subject', 'object'] against the index ['subject', 'predicate', 'object', 'graph'] would be better served by re-ordering quads _per each value of subject`_. This likely wouldn't make a dramatic difference in terms of total sorting time but it would lead to the sorting iterator beginning to emit quads much faster.

Comunica has already implemented sorting based on sliding windows, although its windows are defined by their length rather than by the value of a given term/variable.

@jacoscaz
Copy link
Owner Author

Closing this as ideas for performance improvements are now tracked as cards in https://github.com/beautifulinteractions/node-quadstore/projects/9 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant