mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 09:12:24 +00:00
Fix inadvertent O(N^2) loop within do_paint() which I just
discovered when profiling IPBT. [originally from svn r6602]
This commit is contained in:
parent
7633e06f45
commit
8e368671cc
@ -4822,11 +4822,13 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise)
|
|||||||
!= newline[j].attr) {
|
!= newline[j].attr) {
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
|
if (!dirtyrect) {
|
||||||
for (k = laststart; k < j; k++)
|
for (k = laststart; k < j; k++)
|
||||||
term->disptext[i]->chars[k].attr |= ATTR_INVALID;
|
term->disptext[i]->chars[k].attr |= ATTR_INVALID;
|
||||||
|
|
||||||
dirtyrect = TRUE;
|
dirtyrect = TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dirtyrect)
|
if (dirtyrect)
|
||||||
term->disptext[i]->chars[j].attr |= ATTR_INVALID;
|
term->disptext[i]->chars[j].attr |= ATTR_INVALID;
|
||||||
|
Loading…
Reference in New Issue
Block a user