struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fireapple <taizhang1...@gmail.com>
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
objects(beans).
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: http://www.nabble.com/Performance-issue-with-large-data%28such-as-images%29-tp23945029p23945029.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message