mike-jumper commented on PR #1057:
URL:
https://github.com/apache/guacamole-client/pull/1057#issuecomment-2679632871
Well, I've thrown together a quick benchmark, and the new version leveraging
`GuacamoleParser` actually seems significantly faster:
```console
[mjumper@mdesktop ~]$ java -cp ./guacamole-common-old-reader.jar:.
ReaderBenchmark desktop-vnc.guac
desktop-vnc.guac ... 18.79 ms / run
[mjumper@mdesktop ~]$ java -cp ./guacamole-common-new-reader.jar:.
ReaderBenchmark desktop-vnc.guac
desktop-vnc.guac ... 8.54 ms / run
[mjumper@mdesktop ~]$
```
This is just with calls to `readInstruction()`. The bad news is that things
fail when using `read()` instead:
```console
[mjumper@mdesktop ~]$ java -cp ./guacamole-common-old-reader.jar:.
ReaderBenchmark --buffers desktop-vnc.guac
desktop-vnc.guac ... 13.9 ms / run
[mjumper@mdesktop ~]$ java -cp ./guacamole-common-new-reader.jar:.
ReaderBenchmark --buffers desktop-vnc.guac
desktop-vnc.guac ... FAIL
org.apache.guacamole.GuacamoleException: No instruction available to read.
at
org.apache.guacamole.io.ReaderGuacamoleReader.read(ReaderGuacamoleReader.java:93)
at ReaderBenchmark.readFile(ReaderBenchmark.java:25)
at ReaderBenchmark.main(ReaderBenchmark.java:57)
[mjumper@mdesktop ~]$
```
The test file that I'm using is a recording of a VNC session that's about
19M in size. The benchmark just times how long it takes to fully read through
the recording, averaged over 100 trials.
Here's the hacky, quick-and-dirty benchmark:
https://gist.github.com/mike-jumper/d0939f0c1a4688e9217062788a3ebfba
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]