sprinteins / oscd-plugins

Built OpenSCD Plugins
Apache License 2.0
0 stars 0 forks source link

perf(ce): Limit GSEControl querry to parent #51

Closed clepski closed 1 day ago

clepski commented 1 week ago

GSEControl querry unnecessarily searched the entire document instead of its parent IED

Closes #40, #42

michelguerin commented 1 day ago

@clepski I'll write down my understanding of both the underlying issue and the business rules around it.

One load a .scd file with IEDs, in which goose events are modelised between them. The former code performed queries on the entire document to retrieve these connections, so you added some context to the findReceivedMessages methods via the parameterallIeds, allowing to connect directly to the IED parent.

Due to these changes, the performance has been optimized. I measured : from 10s before to 0.25s with a 12Mo file. Well done !

Before -

Screenshot 2024-09-16 at 17 21 17

After -

Screenshot 2024-09-16 at 17 21 43