Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19687 |

    hi..
    I have created a file Repository and i need to zip all files in a project and upload it to the client. While Zipping the files, the memory consumption seems to be really too much..
    i have pasted the code i used bellow..

    DiskFolder diskFolder = new DiskFolder(pSourceFileFolder);
    diskFolder.CopyFilesTo(new ZipArchive(new DiskFile(vZipFileName)), true, true,null);

    while zipping folders containing lots of files the server hangs and that is not good..

    Is there any other method to zip files without consuming too much memory??

    Pete

    Imported from legacy forums. Posted by catchpete (had 2555 views)

    User (Old forums)
    Member
    Post count: 23064

    The component architecture makes it that it uses memory collections of the items to zip, so when zipping large amount of files, it takes up much memory. There is no workaround, really, apart than splitting the files to zip into different zip archive, so that each zip file will be smaller. Or increase the physical memory on the server… 🙂

    Imported from legacy forums. Posted by André (had 163 views)

    User (Old forums)
    Member
    Post count: 23064

    thanks André

    Imported from legacy forums. Posted by catchpete (had 3473 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.