Pretty print plugin performance issues
See original GitHub issuePretty print plugin is slow, because:
- Calls flush method on every printed line.
- Use unbuffered output stream.
Combination of previous points results in poor performance. In my situation the plugin doubles the run time.
Single thread
When running Cucumber tests in a single thread, the bottleneck is in the OutputStreamWriter.flush()
method.
Multi-threading
When running Cucumber tests in multiple threads, the bottleneck is still in the flush()
method. Because printing is called from synchronised SynchronizedEventBus.send()
method, a thread has to wait for flush()
in other threads, which subsequently kills performance gains from multi-threaded solution.
Expected behaviour
Performance of the NiceAppendable
class should be improved to be close to running tests without the plugin. A good idea may be not to flush on every line.
- Version:
io.cucumber:cucumber-java:7.2.3
- Tests executed from IntelliJ IDEA 2021.3.2
- Build tool: Gradle 5.3.1
- OS: macOS Monterey 12.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Pretty print is slow (linearalized xml 10MB) · Issue #55 - GitHub
I have made a replacement for the pretty print functionality. It also handles the linearize functionality. For my 10MB file, the processing time ......
Read more >Notepad ++ not responding when saving XML file - Community
When I attempt to save an XML file after editing it with the plugin “XML tools” the program goes not responding and crashes....
Read more >Using Prettier and ESLint to automate formatting and fixing ...
Methods for linting and pretty-printing your code; Remove conflicting rules and run serially; Run Prettier followed by ESLint programmatically ...
Read more >prettyprint XML download | SourceForge.net
Download prettyprint XML for free. prettyprint XML provides a ... Application performance monitoring helps engineering teams pinpoint issues ...
Read more >make XML pretty - formatting - Stack Overflow
After installing the plugin from Plugins/Plugins Admin..., click Plugins/XML Tools/Pretty print or just use Ctrl+Alt+Shift+B, or Ctrl+Alt+Shift+A ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Very interesting. I’ll have to take a good look.
@vkuzel https://github.com/cucumber/cucumber-jvm/pull/2541 should be released in a few minutes. Would you mind giving it a try?