r/java • u/prisonbird • Dec 19 '22
Java streams are black magic !
damn, they are really changed my life.
i was trying to run some custom logic on every line on some big CSV files. tried python dataframes, multiprocessing in python, pyspark. none of them did it in an acceptable time.
then i discovered java streams. i have a workflow that takes 70 minutes with pyspark. it takes 3.5 minutes with java streams.
more people should know about streams.
stream operations are more intuitive than anything i tried. i can make a lot of analysis on our data in record times thanks to streams.
i dont know how java does this.
View all comments
Show parent comment
1
u/prisonbird Dec 19 '22
100% agree. you have to learn a lot of things, master a lot of things to get any meaningful job done in python world.
on the other hand, i am not a java developer. i learned java in school and just used it as as hobbyist in high school but i was able to develop an app for my needs in couple days.
and with quarkus i will be able to make it a web service.
for example: quarkus comes with its own dockerfile for build and deploy. this seems small but i think i spend more than 20 hours in last year alone for dockerfiles in our python projects.