struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fireapple <>
Subject Performance issue with large data(such as images)
Date Tue, 09 Jun 2009 15:19:32 GMT

Firstly, I persist the portraits (images) of all users in the db as Strings
(large one, say length 5000). Then, I want to get the String and display the
portraits of users on the web page(like a topic in a forum). Here I know
three solutions but none of them is efficient: 
1. Because the image is large, it's not efficient to store it in
2. Because I have many users(say 300), if I store all the maps(userId and
image) in the session, the session will be huge.
3. Because I have many users(say 300), if I access the db for each user's
image, the worse case is I will have to access db for 300 times.

Is there any solution (such as a design pattern or interceptor) for this
performance issue? Many thanks!
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message