[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cgicc-help] Performance Consideration

From: Iverson, Joshua
Subject: [Cgicc-help] Performance Consideration
Date: Tue, 21 Sep 2010 10:10:09 -0500


I have been playing with cgicc for an embedded project I'm working on.
Being an embedded application, there is little memory available, so
memory usage is a concern.  From looking at the cgicc code, it looks
like when uploading a file, cgicc keeps two copies of the file (and
other POST data) in memory.  This is a problem if the files are big or
the memory available is small.

CgiEnvironment holds one copy in the std::string fPostData and FormFile
holds another copy of the file in the std::string fData.  I propose that
FormFile only store an offset and length into the CgiEnvironment cache.
That would cut one copy out of memory and would be fairly easy to
implement.  Another thing to consider would be caching the
CgiEnvironment copy to a temporary file on disk, so you're not storing
any copies in memory.

Thanks for your work on this project,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]