-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add count of FCDA used in ExtRefs, part of #958 #993
Conversation
I guess we could index all ExtRefs and then update the index as they are created or removed. Is that the best approach? |
Hmmmm... incidentally on a large scd file I notice sticky behaviour with the existing implementation (quite apart from the counts). Using this example file, it takes about 3 seconds between a click on the left-hand side and an update on the right-hand side. |
I had a look at the performance in Chrome, and it seems like indexing is the way to go. A little wip pushed and now I must learn a little more about events between components. Another day 😉 |
c8c7b91
to
2286323
Compare
2286323
to
ea10c7e
Compare
I am now ready and would be grateful for a review. This could be made even faster if we updated the count rather than re-indexing on each subscription action, but that seems excessive. |
src/editors/subscription/later-binding/fcda-later-binding-list.ts
Outdated
Show resolved
Hide resolved
src/editors/subscription/later-binding/fcda-later-binding-list.ts
Outdated
Show resolved
Hide resolved
838c9fe
to
1aa934b
Compare
src/editors/subscription/later-binding/fcda-later-binding-list.ts
Outdated
Show resolved
Hide resolved
I have made some improvements, added some tests and rebased against main and would be grateful for a further review. I found that I could not access |
Hi Daniel, Check this patch how I would do it. But I think there is also something wrong with the counting. I used your file and the counter say 2, but there are no subscribed shown. |
@danyill, I like the changes. We only have one issue, I also did a big refactoring for the Subscriber - Logical Node Plugin (GOOSE/SMV). My proposal is to take your code in a new branch that includes the new plugin and make it work for both plugins (Later and Logical Node Binding). This way I will solve the big conflict I create with refactoring for the new plugin. Do you find this a good idea? |
Thank you for this patch and for looking at this 👍
Oh hurrah, we are making progress. 😄
Yes please, that would be great. |
I had a go at prototyping counting the number of references to an FCDA in project ExtRefs as suggested in #958.
It's by no means complete. However, it seems to ruin the plugin's performance by initially making it slow to load after clicking on the editor and then slow to update after doing a binding. It's so laggy I think it would be unacceptable to users.
I would appreciate a little guidance or a hint. How should I best approach this? Can this be made async?