r/java • • Jun 10 '24

[deleted by user]

[removed]

615 Upvotes

594 comments sorted by

View all comments

Show parent comment

1

u/fgzklunk Jun 15 '24

But that is nothing to do with the language chosen, that's the quality of the developer.

My previous job to the C++ guy was all Java, we had a process that ran at 5pm every working day and took 30 minutes to run. It was taking data that had 5 levels hierarchy and manipulating it to 3 levels, the input was a file and the output was a database. It also went wrong a lot and had to be restarted. I was tasked with changing the code because the input source was changing. When I looked at the code I found the reason for the slow processing, they had a thread to read the file and a thread to write to the database and in the middle was a Vector.

I removed the Vector and the threading, read the file into memory and wrote it to the database. Job now ran in a couple of minutes and not 30.