I'm dynamically generating images for a website and I'm hosting the content 
using ring. Currently I use moustache for routing, where I have a handler 
that returns a response map and the response map contains a 
bytearrayinputstream. Currently I wrap the handler that makes the image 
file with memoize/memo-lru. I thought this would give me the performance 
improvement I needed, but its still noticeably slow to load a large batch 
of images (12 images, each 5kb each can take a few seconds, even if its the 
same set of images being returned). I was expecting the performance to be 
nearly instant since I'm hosting the website on my local machine. The 
operation seems to be CPU bound since the CPU usage is high for that moment 
while the data is transferring, and since the binary data is stored in 
memory (and when cached the binary data should already be in the image 
format which is very small, computation of the images should be nil).

Are there any tips to improve performance? Is there a better InputStream 
type to use?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to