On Tue, Feb 25, 2014 at 3:03 PM, jCoder <[email protected]> wrote: > I was wondering if anyone had any success implementing this with a HashMap > that has a pointer to a BufferedImage. > Example: > Map thumb = new HashMap<String, BufferedImage>(); > > I am currently using Serialization with a custom writeObject() and > readObject() to turn the BufferedImage into a byte[] and back again. > > However this process takes roughly 25 second+ for approximately 18,000 > BufferedImages (size: 16pixels x 12pixels) previously loaded into memory to > be serialized into a file (resulting size 9,408 KB). > Please note this all happening on a SSD (so disk write speed should not be > an issue). > > There has be a faster way to do this perhaps Protocol Buffers can help, I am > just not sure the best way to handle a BufferedImage with it would be. > > Any help would be greatly appreciated.
Try writing a benchmark that simply converts the BufferedImages to byte[] and throws away the results. That's a lower-bound on your overall serialization speed (without switching away from BufferedImage to something else). -ilia -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/groups/opt_out.
