Open Bug 505519 Opened 15 years ago Updated 2 years ago

Optimize row iteration in CalcUnpaginagedHeight

Categories

(Core :: Layout: Tables, defect)

defect

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

()

Details

Bernd found a performance bug in bug 479166 comment 1, from code inspection.  Quoting his comment:

> The called code at
> http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/tables/nsTableCellFrame.cpp&rev=3.414&mark=774,775,785-793#763
> 
> looks like a performance penalty. We first look up a the row parent of the
> cell. Its naturally the first row, and then instead of starting the loop there
> we loop over *all* rows till we find the first row that is covered by the cell.

I'm filing this bug about fixing that issue, per bug 479166 comment 3.
i would like to work on this bug ...  so i think its enough if you remove first assignment in the for loop. please correct me if i am wrong . and can you please assign me this bug

Thanks
Thanks!

I believe Bernd's point was that we should start that loop with...
   for (row = rowIndex
...instead of...
   for (row = firstRGInFlow->GetFirstRow()
...because the loop body doesn't do anything until row is >= rowIndex anyway.

(Bernd, correct me if I'm wrong)
Assignee: nobody → ravicat2013
Status: NEW → ASSIGNED
Sorry, disregard that last comment; I misread the code & was confusing row & rowX & made no sense.

I believe comment 1 is what Bernd had in mind, but I haven't looked at the code hard enough yet to be sure.

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: ravicat2013 → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.