Priority: Enhancement
Current State: No Action Required
Released In: n/a
Target Release: n/a
When formating option contains many selection options rendering of the table takes longer.
EDITTABLE{format="| select,1,dropdown1,dropdown2,dropdown3 | "}
- if there is only "drowdown1" then page rendering takes <1sec
- if there is 20 select options then it takes 5sec
- performance degradation is linear (the more options the slower it is)
Test case is here
EditRowPluginPerformanceTestCase (however
EditRowPlugin is not installed on foswiki.org)
--
VasekOpekar - 22 Mar 2012
quick fix in
EditRowPlugin/Editor/select.pm, if one doesnt mind missing functionality... not good
sub jQueryMetadata {
my $this = shift;
my ( $cell, $colDef, $text ) = @_;
my $data = $this->SUPER::jQueryMetadata(@_);
if ($colDef->{values} && scalar(@{$colDef->{values}})) {
<------># Format suitable for passing to an "erpselect" type
<------>my %d = (
<------> order => [ @{$colDef->{values}} ],
<------> selected => $cell->{text},
<------> keys => {}
<------>);
<------>map {
<------> $d{keys}->{$_} = $_;
#<-----><------>Foswiki::Func::renderText(Foswiki::Func::expandCommonVariables($_));
<------>} @{$colDef->{values}};
<------>$data->{data} = \%d;
}
$this->_addSaveButton($data);
return $data;
}
--
VasekOpekar - 23 Mar 2012
probably some per column caching of the expanded and redered text would be better
--
VasekOpekar - 23 Mar 2012
The latest version of the plugin only creates elements when absolutely needed, so this problem should no longer be there. Certainly I can't reproduce it. Plugin release planned imminently.
--
CrawfordCurrie - 19 Aug 2012