Skip to content

Conversation

valfirst
Copy link
Collaborator

Change list

Improve performance of proxy Interceptor logging

Types of changes

What types of changes are you proposing/introducing to Java client?

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@mykola-mokhnach
Copy link
Contributor

mykola-mokhnach commented Jan 25, 2023

Could you please provide some links to actual performance comparisons/documentation?

@valfirst
Copy link
Collaborator Author

That's a recommendation from SLF4J: https://www.slf4j.org/faq.html#logging_performance

@mykola-mokhnach
Copy link
Contributor

That's a recommendation from SLF4J: https://www.slf4j.org/faq.html#logging_performance

If I read it right the tutorial above advices something like logger.debug("The new entry is {}.", entry);

@valfirst
Copy link
Collaborator Author

If I read it right the tutorial above advices something like logger.debug("The new entry is {}.", entry);

Right, that's a major improvement: replace String.format with parametrised message.

Also PR uses fluent logging approach (https://www.slf4j.org/manual.html#fluent), it allows to calculate logged values lazily (only if logging for the particular level is enabled).

@mykola-mokhnach mykola-mokhnach merged commit ca86a39 into appium:master Jan 26, 2023
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.

3 participants