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 Logging Options to Improve Performance #529

Merged
merged 2 commits into from
Oct 21, 2020
Merged

Added Logging Options to Improve Performance #529

merged 2 commits into from
Oct 21, 2020

Conversation

OnyxAzryn
Copy link
Contributor

Hello and I hope you are doing well. I fixed my previous pull request for logging options and only included those changes here.
I sincerely appreciate your time and effort in creating this project and I wanted to give something back to it. I noticed that you used a large amount of logging, which severely impacts performance when using the app. Thus, I created a set of switches in main.js to disable logging if it is not required by end users without impacting debugging. These switches utilize short-circuit evaluation, which prevents the console commands from running if the switches are turned off.
Furthermore, if you were to use Uglify to produce a production deliverable, the dead code produced by the switches should automatically be removed.

@Azgaar Azgaar self-assigned this Oct 21, 2020
@Azgaar
Copy link
Owner

Azgaar commented Oct 21, 2020

Thanks for the contribution!

Would you please amend it to make more usable? We need some generic info and errors in console, it's pretty convenient way of passing info to user in case of issues.

const INFO = 0; // for info messages, mainly log and group; set to FALSE by default
const TIME = 0; // for timing messages; set to FALSE by default
const WARN = 1; // for warn messages; set to TRUE by default
const ERROR = 1; for error messages; set to TRUE by default

@OnyxAzryn
Copy link
Contributor Author

Thanks for the contribution!

Would you please amend it to make more usable? We need some generic info and errors in console, it's pretty convenient way of passing info to user in case of issues.

const INFO = 0; // for info messages, mainly log and group; set to FALSE by default
const TIME = 0; // for timing messages; set to FALSE by default
const WARN = 1; // for warn messages; set to TRUE by default
const ERROR = 1; for error messages; set to TRUE by default

You're welcome. I made those requested changes.

@Azgaar Azgaar merged commit f4efedc into Azgaar:master Oct 21, 2020
@Azgaar
Copy link
Owner

Azgaar commented Oct 21, 2020

thanks, merged

Azgaar pushed a commit that referenced this pull request Feb 4, 2021
* Added Logging Options to Improve Performance

* Requested Changes

Co-authored-by: Onyx Azryn <[email protected]>
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