When large-scale Excel downloads keep hitting OOM no matter how much memory you add, and writing Apache POI streaming code from scratch every time is costly, StreamSheet is a Spring Boot library that strips away that repetition with a single annotation.

1 Million Rows Without OOM

Data is never loaded into memory all at once. Using JPA Stream or JDBC ResultSet, it reads sequentially while running queries and writing the file simultaneously. Garbage collector load stays constant, and process utilization remained stable in load tests.

It supports various database environments, so there are no constraints when attaching it to existing projects.

One Annotation and Done

Add an annotation to the object and configuration is complete. Spring Boot Auto-configuration is built in, so it works immediately just by adding the dependency. Specify the return type and the internal converter opens a stream and transmits data.

Changing column order or names requires modifying just one config value. No need to cross-reference column numbers manually, and the effort of maintaining Apache POI boilerplate code by hand disappears.


Key Takeaways

  • Sequential processing with JPA Stream and JDBC ResultSet means no OOM on 1M-row Excel downloads
  • The declarative annotation-based approach eliminates the need to write Apache POI boilerplate
  • Spring Boot Auto-configuration support means it plugs into existing projects by just adding the dependency

Related Posts

Source: https://news.hada.io/topic?id=27997