chuckbinder commented on PR #76: URL: https://github.com/apache/mina-ftpserver/pull/76#issuecomment-2832486444
Thank you for pointing out the boxing concern! Using a scenario of 100 clients connecting in and transferring 1 GB File concurrently the following is saved: Each transfer triggers 262,144 lastAccessTime updates. With the current design, this results in 26 million temporary Date object allocations. Switching to storing System.currentTimeMillis() (boxed Long) reduces object size but still creates 26 million Long allocations. Introducing LazyDateHolder eliminates per-update allocations completely by maintaining a single reusable object with a primitive long, creating a Date only if necessary. This significantly reduces GC pressure and improves server scalability under load. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org