Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl TK performance issue

by perltux (Beadle)
on Dec 05, 2012 at 09:31 UTC ( #1007246=note: print w/ replies, xml ) Need Help??


in reply to Perl TK performance issue

Ok, just an update, I have narrowed down the performance issue to the BrowseEntry widgets, if I comment out the BrowseEntry widgets then the window shows up almost instantly.

So it looks like BrowseEntry widgets (or at least the way I'm using them) are very cpu intensive.

What could be functionally equivalent but more efficient substitute widgets for the BrowseEntry widget?


Comment on Re: Perl TK performance issue
Re^2: Perl TK performance issue
by Anonymous Monk on Dec 05, 2012 at 11:02 UTC

    plain listbox/combobox?

    FWIW, it takes about 2 seconds for the sub to run for me, plus a few more (I guesstimate 4) for Tk to actually draw it

    OTOH, wxPerl pops up an equal amount of widgets in 1 sec, and it takes 1 sec to destroy them all

    Both take up about the same amount of RAM

    Its fairly similar to Tk (snippet of code generated by wxglade)

    $self->{label_A} = Wx::StaticText->new($self, -1, "A", wxDefaultPositi +on, wxDefaultSize, ); $self->{bank1_sizer2_combo1} = Wx::ComboBox->new($self, -1, "", wxDefa +ultPosition, wxDefaultSize, [], wxCB_DROPDOWN); $self->{bank1_sizer2_combo2} = Wx::ComboBox->new($self, -1, "", wxDefa +ultPosition, wxDefaultSize, [], wxCB_DROPDOWN); $self->{bank1_sizer2_slider} = Wx::Slider->new($self, -1, 0, 0, 10, wx +DefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_AUTOTICKS|wxSL_LAB +ELS|wxSL_TOP); $self->{bank2_sizer2_combo1} = Wx::ComboBox->new($self, -1, "", wxDefa +ultPosition, wxDefaultSize, [], wxCB_DROPDOWN); $self->{bank2_sizer2_combo2} = Wx::ComboBox->new($self, -1, "", wxDefa +ultPosition, wxDefaultSize, [], wxCB_DROPDOWN); $self->{bank2_sizer2_slider} = Wx::Slider->new($self, -1, 0, 0, 10, wx +DefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_AUTOTICKS|wxSL_LAB +ELS|wxSL_TOP); $self->{bank3__ck_sizer2_a} = Wx::CheckBox->new($self, -1, "", wxDefau +ltPosition, wxDefaultSize, ); $self->{bank1_sizer2_combo1}->SetMinSize(Wx::Size->new(30, 21)); $self->{bank1_sizer2_combo1}->SetSelection(-1); $self->{grid_sizer_1} = Wx::GridSizer->new(49, 3, 0, 0); $self->{bank1_sizer2} = Wx::BoxSizer->new(wxHORIZONTAL); $self->{bank2_sizer2} = Wx::BoxSizer->new(wxHORIZONTAL); $self->{bank3__ck_sizer2} = Wx::BoxSizer->new(wxHORIZONTAL); $self->{grid_sizer_1}->Add($self->{bank1_sizer2}, 1, wxEXPAND, 0); $self->{grid_sizer_1}->Add($self->{bank2_sizer2}, 1, wxEXPAND, 0);

    Distribution is easy with http://www.citrusperl.com//http://www.cavapackager.com/ for many platforms

    There is even my wxWidgets / wxPerl / wxGlade tutorial

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007246]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-09-20 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls