Skip to content

Commit

Permalink
Remove workaround in getMappingsForSubjects
Browse files Browse the repository at this point in the history
Not necessary anymore after gbv/jskos-server#221 was fixed.
  • Loading branch information
stefandesu committed Nov 20, 2024
1 parent 6cc5d00 commit ac9b31c
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/client/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export async function getMappingsForSubjects(subjects) {
const
toScheme = state.schemes.map(s => s.uri).join("|"),
cardinality = "1-to-1",
direction = "both",
configs = [],
limit = 500
let current = []
Expand All @@ -79,19 +80,12 @@ export async function getMappingsForSubjects(subjects) {
// Cutoff when maxLength is exceeded (or after last element)
if (length >= maxLength || (subject === null && from.length)) {
current = []
// This was originally a workaround for a bug in jskos-server.
// That bug (https://github.com/gbv/jskos-server/issues/219) is now fixed,
// however, there seem to be performance issues with direction=both, so we're keeping this for now.
// See: https://github.com/gbv/jskos-server/issues/221
// TODO: Adjust after performance issues are fixed.
;["forward", "backward"].forEach(direction => {
configs.push({
from,
toScheme,
cardinality,
direction,
limit,
})
configs.push({
from,
toScheme,
cardinality,
direction,
limit,
})
}
current.push(subject)
Expand Down

0 comments on commit ac9b31c

Please sign in to comment.