help wxTextCtrl with very large files
Posted: Wed Dec 21, 2005 5:04 pm
Hello everyone,
We are working on a project that translates very large log files into more human readable form, these log files range from 15 MB to over 1 GB depending on who created it and what information is logged.
We have two wxTextCtrls, one that has raw log file output and another that has translated text. We want to allow the user to view the full untranslated log file by scrolling through the raw log wxTextCtrl but to conserve memory we also want to limit the currently displayed text to about 50 lines.
We have been unable to implement this in such a way that does not severely impact performance (currently every time a line is added to the control we check to see if there is 50 lines, if so we drop the first line and add the new content).
The last bit of information is the raw log file can be a live file, meaning we are parsing it at the same time information is being added to it.
I'd sincerely appreciate any help or suggestions.
Jason
We are working on a project that translates very large log files into more human readable form, these log files range from 15 MB to over 1 GB depending on who created it and what information is logged.
We have two wxTextCtrls, one that has raw log file output and another that has translated text. We want to allow the user to view the full untranslated log file by scrolling through the raw log wxTextCtrl but to conserve memory we also want to limit the currently displayed text to about 50 lines.
We have been unable to implement this in such a way that does not severely impact performance (currently every time a line is added to the control we check to see if there is 50 lines, if so we drop the first line and add the new content).
The last bit of information is the raw log file can be a live file, meaning we are parsing it at the same time information is being added to it.
I'd sincerely appreciate any help or suggestions.
Jason