Skip to content
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

Added a stopwatch to the magic number checks #655

Merged
merged 1 commit into from
Jun 26, 2021

Conversation

Mailaender
Copy link
Contributor

to investigate OpenChrom/openchrom#101.

@eselmeister
Copy link
Contributor

It looks good. As logging also consumes processor time and space for the log file on disk, we could probably add a system option to enable/disable the MagicNumberMatcher logging on demand.

@eselmeister eselmeister merged commit cfb0479 into eclipse:develop Jun 26, 2021
@Mailaender Mailaender deleted the magic-number-perf branch June 26, 2021 08:06
@Mailaender
Copy link
Contributor Author

Yes, I was a bit torn on it as a check against the preferences will also cost CPU (haven't profiled any of it) so maybe increasing if(spent > 0) miliseconds might be a way. As I don't have any clue whether those performance problems are caused by large spikes from a single unoptimized converter or just the shere number of magic number checks I kept it track almost everything.

@eselmeister
Copy link
Contributor

Yep, good idea. Let's keep it so far as it is. If we discover performance issues due to the stopwatch, we could have a look at this again. There are several ways, how to address it:

  • increase the "spent time" limit for reporting
  • Add a VM argument -Denable.magicnumber.stopwatch=true
  • ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants