[jQuery] Re: Browser Hangs while hiding 2K+ table rows

2008-12-22 Thread RickyBerg

Cam, I'm hiding all rows only in anticipation of showing the higher
levels of the tree that is represented by this table. Each row has a
class associated with it that indicates the level which simply has a
left-margin css value associated with it giving the appearance of
subordination in the tree.  Essentially, I hide all relevant rows,
then show rows with classes leveln where n is incremented in a loop,
so if I select to show only the first 3 levels, I hide all, show
level1, level2, and level3, leaving the rest hidden.

There may be a better way to do it, but that's what I came up with.

As for hiding the tbody, that does not allow me to then show the rows
that I want to be visible, because their parent element is hidden.

Eric

On Dec 18, 2:39 pm, Cam Spiers camspi...@gmail.com wrote:
 If you are trying to hide allrows would it be possible to hide either the
 table or the tbody?

 On Fri, Dec 19, 2008 at 7:28 AM, RickyBerg bergbra...@gmail.com wrote:

  I've been converting a legacy web app to use JQuery.  I've now cleaned
  it up so that my HTML validates and I have instrumented the code with
  classes and id's as appropriate.  This app is essentially a table that
  displays the status of jobs for Autosys.

  The problem that I'm having is that when I hide the entire list, the
  browser hangs for several minutes.

  There are sometimes over 2000 rows.  I have cached the full resultset
  into a variable, though I'm not sure how helpful this is.

  In the code below, the initial setting of $allRows doesn't take much
  time at all, but when I hit the hide() line, the browser hangs for
  wy too long.  interestingly, if I comment out the hide() command,
  and then manually issue a comand like $allRows.css(color, red); it
  works in a very reasonable amount of time.

  $(function() {
     $allRows = $(tbodytr);
     $allRows.hide();
  }

  Also, if I let it run once to completion and all of the rows are
  hidden, then I can show() them and hide() them in reasonable time.

  Is it something with my selector?

  Thanks, folks.

  Eric


[jQuery] Browser Hangs while hiding 2K+ table rows

2008-12-18 Thread RickyBerg

I've been converting a legacy web app to use JQuery.  I've now cleaned
it up so that my HTML validates and I have instrumented the code with
classes and id's as appropriate.  This app is essentially a table that
displays the status of jobs for Autosys.

The problem that I'm having is that when I hide the entire list, the
browser hangs for several minutes.

There are sometimes over 2000 rows.  I have cached the full resultset
into a variable, though I'm not sure how helpful this is.

In the code below, the initial setting of $allRows doesn't take much
time at all, but when I hit the hide() line, the browser hangs for
wy too long.  interestingly, if I comment out the hide() command,
and then manually issue a comand like $allRows.css(color, red); it
works in a very reasonable amount of time.

$(function() {
$allRows = $(tbodytr);
$allRows.hide();
}

Also, if I let it run once to completion and all of the rows are
hidden, then I can show() them and hide() them in reasonable time.

Is it something with my selector?

Thanks, folks.

Eric