S
scotp
Does anyone know what would cause excessive page faults
running the js function below? The most common browser used
is IE 6. The page has records that include text & checkbox
inputs. Each record also has a hidden input named
"questions", whose value is an id that is used in the name
of inputs to be disabled. The number of page faults
increases dramatically as records increase. I know it is
the for loop that is taking the extra time, & generating the
faults, but I don't know why.
I counted page faults while deleting, and adding records:
Records Page Faults
150 350k+
117 178k
100 91k
75 36k
50 8k
24 518
10 2
20 177
30 670
40 1518
50 5631
60 8491
70 18k
80 32k
90 55k
100 87k
120 184k
150 420k
function disableWeights(fld)
{
//DISABLE Question weights & Point Basis when a section is
changed or a delete box is checked
var dis=false;
var frm=fld.form;
var fldName=fld.name;
var id=fldName.substr(fldName.lastIndexOf("_")+1);
var ques_lst=frm["questions"]; //array of question rowID's
if (fldName.substr(0,3)=="del")
{
if (fld.checked) frm.change.value++;
else frm.change.value--;
}
if (parseInt(frm.change.value)>0) dis=true;
frm.pointBasis.disabled=dis;
for (quesrow=0; quesrow<ques_lst.length; quesrow++)
{
if (ques_lst.length==1) qid=frm.questions.value;
else qid=ques_lst[quesrow].value;
q_type=frm["q_type_" + qid].value;
if (q_type!="Note")
{
frm["pt_weight_" + qid].disabled=dis;
}
}
return;
}
running the js function below? The most common browser used
is IE 6. The page has records that include text & checkbox
inputs. Each record also has a hidden input named
"questions", whose value is an id that is used in the name
of inputs to be disabled. The number of page faults
increases dramatically as records increase. I know it is
the for loop that is taking the extra time, & generating the
faults, but I don't know why.
I counted page faults while deleting, and adding records:
Records Page Faults
150 350k+
117 178k
100 91k
75 36k
50 8k
24 518
10 2
20 177
30 670
40 1518
50 5631
60 8491
70 18k
80 32k
90 55k
100 87k
120 184k
150 420k
function disableWeights(fld)
{
//DISABLE Question weights & Point Basis when a section is
changed or a delete box is checked
var dis=false;
var frm=fld.form;
var fldName=fld.name;
var id=fldName.substr(fldName.lastIndexOf("_")+1);
var ques_lst=frm["questions"]; //array of question rowID's
if (fldName.substr(0,3)=="del")
{
if (fld.checked) frm.change.value++;
else frm.change.value--;
}
if (parseInt(frm.change.value)>0) dis=true;
frm.pointBasis.disabled=dis;
for (quesrow=0; quesrow<ques_lst.length; quesrow++)
{
if (ques_lst.length==1) qid=frm.questions.value;
else qid=ques_lst[quesrow].value;
q_type=frm["q_type_" + qid].value;
if (q_type!="Note")
{
frm["pt_weight_" + qid].disabled=dis;
}
}
return;
}