Skip to content

How can i incorporate preprocessing into a service class, will adding them as regular method calls have drastic effects? #1289

Answered by jponge
abhikvarma asked this question in Q&A
Discussion options

You must be logged in to vote

Your mileage varies but both are very sound approaches 😉

Assuming somePreprocessing isn't doing any I/O work then I'd go with the first variant as it results in a simpler pipeline.
That being said the second variant is totally fine, it just allocates a few more objects with the initial Uni object creation and transformToUni step.

For most workloads you shouldn't see any throughput / latency difference, really.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by abhikvarma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants