7 ms·
I ran into 5 and 7 in a Flink app recently - was parsing a timestamp as a number first and then falling back to iso8601 string, which is what it was. The flameg
by hiyer 6mo ago
I ran into 5 and 7 in a Flink app recently - was parsing a timestamp as a number first and then falling back to iso8601 string, which is what it was. The flamegraph showed 10% for the exception handling bit.
While fixing that, also found repeated creation of datetimeformatter.
Both were not in loops, but both were being done for every event, for 10s of 1000s of events every second.
- wood_spirit 6mo ago(Perhaps a good library for timestamp code in data pipelines https://github.com/williame/TimeMillis https://github.com/williame/TimeMillis)
- hiyer 6mo agoThanks! I'm using Instant.parse at present and this is supposedly 37x faster. Will definitely give it a try.
- wood_spirit 6mo agoAnd report back please! :)