Conversation
4 tasks
osma
force-pushed
the
feature-optimize-changelist-skosmos3
branch
from
March 25, 2026 09:13
dc6032b to
7a4f130
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is work in progress. It's not yet functional.
It supersedes PR #1785 which was made for Skosmos 2. This is for Skosmos 3.
Reasons for creating this PR
I'm trying to optimize the "New" / "New and Deprecated" tab that shows the recently added (or deprecated) concepts. It is very slow, especially in the case of a large vocabulary such as KANTO/finaf.
The optimized SPARQL query in this PR introduces a cutoff date, by default 1 year in the past. Only concepts whose timestamp (created or modified, depending on circumstances) is after this cutoff date are included in the query results. This drastically reduces the number of concepts to consider and so speeds up the query by a factor of approximately 10 (yso) to 15 (finaf).
Link to relevant issue(s), if any
n/a
Description of the changes in this PR
Known problems or uncertainties in this PR
Unfortunately, this change causes problems for the unit tests. The test data is much older than 1 year, so a lot of tests will fail because the time stamps are older than the default cutoff date. I tried to fix this by making the cutoff date into a parameter, but this makes the code more complicated, and I didn't yet get it working. I wonder if another mechanism - for example a configuration setting that sets the cutoff date - would work better for this.
Checklist
.sr-onlyclass, color contrast)