-
Notifications
You must be signed in to change notification settings - Fork 594
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
SSE Performance with big events #1508
Comments
What specifically is "long" and what is desired; how long do you think is achievable with a raw impl, and how much part of that is that the events are being pulled in slowly? Please provide more details so this can be acted upon accordingly |
By long i mean What do you mean by how long do you think is achievable with a raw impl? |
Kennedy,
do you have a JMH bench we can take a look at?
…--
Cheers,
√
On Nov 1, 2017 18:45, "Kennedy Oliveira" <notifications@github.com> wrote:
By long i mean 1 ~ 2 MB, the desired is to parse it fast, currently it
can't be parsed in 1 minute and the TCP timeout, i don't know how much time
is needed with the current implementation.
What do you mean by how long do you think is achievable with a raw impl?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1508 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAqd1esLAr4dtZWkYx7orEaWHG1b12wks5syK5TgaJpZM4QOiW7>
.
|
@viktorklang i don't have, i will write one and post the link here |
Hey @viktorklang i created a simple benchmark akka-http-lineparser-bench and was able to improve the performance of the parser via PR #1510. Here are some benchmark numbers i got from running the bench on my machine:
I did not finished the baseline benchmark for 1 and 2 mb payload because it was taking too long, but for the improved versions here are the numbers:
My machine has the following specs: Hope it helps! |
Lookin good, that's what I was asking for :) Could you include that benchmark in the PR as well? It'd just test the existing one ofc, but very good addition to our benchmark suite. It can be added to |
@ktoso thanks for the feedback, sure i can add the benchmark, but looking at |
Ah, my bad, missed this was in akka-http; Setting up a bench project inside akka-http would be the best then. If you're up for it it would be about copying the benchJmh project from https://github.com/akka/akka/blob/master/build.sbt#L88 and adding the plugin https://github.com/akka/akka/blob/master/project/plugins.sbt#L17 then creating akka-bench-jmh and we're all set to have jmh benches here. |
Ah no problem haha, i'll setup the project and update the PR then :) |
Awesome, thanks; great contrib |
- Improved performance of LineParser - Created benchmark subproject - Added benchmark for LineParser
- Improved performance of LineParser - Created benchmark subproject - Added benchmark for LineParser
- Improved performance of LineParser - Created benchmark subproject - Added benchmark for LineParser
@ktoso i added the benchmark project with the LineParser benchmark |
Any news? |
Please ping in the PR though :-) |
* Improve performance of LineParser for SSE unmarshalling #1508 - Improved performance of LineParser - Created benchmark subproject - Added benchmark for LineParser * Fix parsing of CR ending lines according to the specification * Reformatting * Fix line parsing behavior * Renaming variables
Fixed by #1510. |
=htp #1508 cosmetic changes: rename remaining var and move comments
Hi!
While consuming events from the Marathon SSE via Alpakka SSE Connector, i noticed it wasn't consuming some events and instead closing the connection, investigating a bit, i found that the
akka.http.scaladsl.unmarshalling.sse.LineParser
used to feed lines in theEventStreamParser
takes to long to parse a line who is big, i know usually the sse doesn't send big lines, but Marathon send some events that have 1 ~ 2 mb, and it takes too long to parse the line.I mentioned the Marathon because is my use case, but any big event will do.
Is there a alternative for consuming big events?
The text was updated successfully, but these errors were encountered: