I was able to change the BufferedImage to an ImageIcon which is 
This along with using the FST Serialization class/jar I was able to improve 
the over all write time to about 10 seconds for a total write size of about 
140 MB
Which is still only 14MB/s write speed when I know I can write at 150+MB/s

My question is can ProtoBuf handle serializing an ImageIcon, Color, or any 
Java objects besides basic Strings and Ints? and is it faster the FST?

Also one of my custom object classes has a nested object class inside of 
it, will this slow down serialization?

On Wednesday, February 26, 2014 9:10:24 PM UTC-5, Ilia Mirkin wrote:
> On Tue, Feb 25, 2014 at 3:03 PM, jCoder <jwc...@gmail.com <javascript:>> 
> 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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to