|
|
|
Re: Archive serialization performance [message #528424 is a reply to message #528388] |
Tue, 20 April 2010 13:18 |
Greg Babcock Messages: 53 Registered: July 2009 |
Member |
|
|
I appologize for the typo, the Zip file consumes 350K, so the size is what I
expected. The problem is the serialization performance. I was able to
resolve the problem by managing the stream myself. Serializing to a Zip
file now takes about the same amount of time as standard serialization.
fileOutputStream= new FileOutputStream("c:/temp/test.zip");
ZipOutputStream out= new ZipOutputStream(fileOutputStream);
for(Resource r:resourceSet.getResources()){
out.putNextEntry(getZipEntry(r));
r.save(out, null);
}
Thanks,
GB
"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:hqk1ib$8c3$1@build.eclipse.org...
> Greg,
>
> Comments below.
>
>
> Greg Babcock wrote:
>> My test model is about 1.1Meg in size and consists one main resource
>> (75K) and 180 resources that each contain an array of 660 doubles. It
>> takes 15 - 35 seconds and 350Meg of disk space to store it as an archive.
>> It takes 350ms and consumes 2Meg of disk space to use the default XMI
>> serialization. EMF 2.6M6 is slightly faster than 2.5 but not
>> significantly.
>>
> It's a little bit difficult to imagine a zip file taking more space than a
> flat file. Especially 175 times more. What would explain numbers like
> that?
>> I didn't find any optional settings that would improve performance, am I
>> missing something?
>> Are there any plans to address the performance issues associated with
>> serializing to and archive file?
>>
> It's the same serialization except that the streams being used are things
> like ZipInputStream and we can't control the performance of that. Note
> that to write a file to an archive, the entire archive needs to be read in
> and written out, along with actually serializing the one zip entry, so
> that will take significant time
>> Thank you,
>>
>> GB
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.02719 seconds