> > P.S.: and the reason why the more you have new lines, the more it is > fast is -- I think according to the code -- that there is a slight error > in rxvt_process_getc. > In this function, you are incrementing PVTS(r, page)->scrolled_lines > each time you encounter a newline character, but also each time you go > to the line because your text is too long for display. This is good. But > in the same time, you have a variable called nlines, and this one is > incremented only when you encounter a newline. The consequence is that > when you have very very long lines but very few newline characters, this > variable won't be at all significant of the real number of lines you > will display on screen. And unfortunately this is this variable which > will be used in rxvt_scr_add_lines for the first MEMMOVE (the only > MEMMOVE which is more than one line, showing how much important it is to > make fewer MEMMOVE).
To make a convincing test of this, add: nlines++; between command.c:6787 and 6788 and replace: PVTS(r, page)->scrolled_lines >= limit by: nlines >= limit line 6794. On my file (112 Mo for 1301691 lines), I gain a few seconds, around 39 to 37 secs, not much but this is not a log file with extremely big lines, like Seung Jun's one, so the gain is not so big (the difference between PVTS(r, page)->scrolled_lines and nlines must be very small, but still we gain some seconds!). I think you will see the difference on your original unwrapped file, Seung Jun. This can be an easy workaround to commit in the revision, but this is not the best fix anyway (which is to have a better buffer design as I proposed). By the way, for the query of generating a random text file from Gautam, you can simply edit your own file with vim, and make a search replace like this: :%s/\S/a/g This will replace all non space characters by 'a'. Jehan ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Materm-devel mailing list Materm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/materm-devel mrxvt home page: http://materm.sourceforge.net