Skip to content

Commit

Permalink
Put back call to getQualifiers on update
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperengstrom committed Dec 18, 2024
1 parent ae6aa60 commit c6b3450
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ function lxlQualifierPlugin(getLabelFn?: GetLabelFunction) {

update(update: ViewUpdate) {
if (update.docChanged || syntaxTree(update.startState) != syntaxTree(update.state)) {
// let's see how it works to run getQualifiers only on new data and not on input
// should be much better for performande...
// this.qualifiers = getQualifiers(update.view);
// TODO: Calling getQualifiers on every document change is probably not good for performance
// Try optimizing; either run the function only on certain kinds of input, or split getQualifiers;
// one that updates the widgets (on input) and one that looks for labels (on data update)
this.qualifiers = getQualifiers(update.view);
} else {
for (const tr of update.transactions) {
for (const e of tr.effects) {
Expand Down

0 comments on commit c6b3450

Please sign in to comment.