I think it will be slower on very large files only. I tested it with a 39MB filter.log file and the new version took 12 seconds to display the graph, but with the old version, it took less than 2 seconds. Oh well. It is safer now.
Bob
Moderator: Forum-Team
Bob Loeffler hat geschrieben:I tested it with a 39MB filter.log file

void readline(FILE *f, std::string &result)
{
result = "";
char block[512];
while (fgets(block, 512, f))
{
if (block[strlen(block) - 1] == '\n')
return;
result.append(block);
}
}





Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste