-
Notifications
You must be signed in to change notification settings - Fork 30
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
IsMultiplexed run time #37
Comments
Hi @taylorjdlee , To be honest, this
sounds weird. Beside the performance reason, there is a conceptual reason to me: if you keep asking is signal multiplexed? (in code terms So, ok, I will have a look at performances but please consider instantiate classes that know what to do upfront for best performance results. Regards |
I pretty much agree with @Adhara3 on this but i guess it could be helpfull to have a IsMultiplexed Property instead of the ExtensionMethod. I wouldnt be using a method for something that cant change. Otherwise theres not much to optimize the code of IsMultiplexed(). However if you are using Sonarqube it suggests using Exists instead of Any. (https://sonarsource.github.io/rspec/#/rspec/S6605/csharp) |
…r for code cleanup; Add IsMultiplexed to signal
Will be part of the immutability refactoring and will I Claude the extended multiplexing |
DbcParser/DbcParserLib/Extensions.cs
Line 64 in 59b4eb6
Due to using the any() method IsMultiplexed() can take sometime to run if there are a lot of signals present in the message. It would be great if we could have a simple boolean in the message that means we don't have to iterate across every signal to improve the runtime of this function.
But I also think it's down to the runtime of MultiplexingInfo
DbcParser/DbcParserLib/Extensions.cs
Line 45 in 59b4eb6
Pretty much I want IsMultiplexed() to be efficient as possible due to using this library to decode data at runtime. Maybe the message class can even have a boolean value stored that does this? Pretty much when we initialise a message when loading from the .dbc we run the IsMultiplexed() function once to generate this boolean value
The text was updated successfully, but these errors were encountered: