Problem with solution model in tabpanel

Questions and answers for designing and implementing forms in Servoy

Problem with solution model in tabpanel

Postby sceresini » Tue Apr 10, 2012 1:52 pm

Hi guys,
I've got a performance problem with solution model in tabpanel.
I drawn in s.m. a table made by 60 columns and 8 rows ( it's a resume paper of shipping) and then I put it into a tabpanel.
When the user change a value in a cell I've to re-draw the table, so I have to remove the form from the tabpanel

forms.interfacciaPrincipale.elements.tabs_video.removeAllTabs();

and then I write this code for destroy s.m. form

if ( history.removeForm( v_form_name ) )
solutionModel.removeForm( v_form_name );

So the problem is that the program wait 15 or more seconds on the row with removeAllTabs().
Is a normal behaviour? Anyone had this problem?

Thanks to all!! :D :D
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm

Re: Problem with solution model in tabpanel

Postby sceresini » Thu Apr 12, 2012 4:00 pm

No ideas?
Help me! :cry: :cry:
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm

Re: Problem with solution model in tabpanel

Postby Andrei Costescu » Thu Apr 19, 2012 3:01 pm

What you do sounds very inefficient... (recreating a whole form when the value of a cell changes)
Are you sure controller.recreateUI() is not enough after you modify existing form for your purpose. Do you need to remove all tabs/remove form and recreate form?

I don't quite understand what the use-case is (what cell gets modified, what do you mean by table, ...), but anyway, 15 sec seems a lot for just a removeAllTabs call. Are you sure it's just the removeAllTabs() call taking that long (you can make sure by using application.getTimeStamp())? Do you have long running code on onHide/onUnLoad? How many tabs are there? :) (I'm thinking hundreds)
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Problem with solution model in tabpanel

Postby sceresini » Mon Apr 30, 2012 11:40 am

Thanks Andrei for your reply.
Maybe I've not explain my problem clearly.
I have to re-design all table, not a single cell, because if I change a value then in accord other values will changes. However 'removeAllTabs()' is mandatory because when you click on another node of menu you have to clean the main tab where is loaded the clicked form ( I attach a print screen of the interface ).
I'm sure that is removeAllTabs(), because if I susped with debugger the running method the program is stopped on this row.
I've no onLoad() or onShow() and if I check with Performance data on admin page I've no problem with running queries.

Thanks for your interest.
Attachments
interface.jpg
interface.jpg (145.49 KiB) Viewed 6186 times
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm

Re: Problem with solution model in tabpanel

Postby Andrei Costescu » Mon Apr 30, 2012 12:25 pm

You say you have to redesign, but you talk about value changes needed when another value changes.
If it's only about values, you don't have to redesign (if fields/layout doesn't change), changing the field dataproviders should suffice. Maybe I'm misinterpreting.
But anyway, the problem here is that (let's say you do need to rebuild whole form on the right) the remove tabs call takes too long (for only one table view tab).

Do you have any (error) messages in "servoy_log.txt" at the time you run that call?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Problem with solution model in tabpanel

Postby sceresini » Mon Apr 30, 2012 2:26 pm

Andrei, you have not misinterpreted: the problem is that I've not explain the question in a good way! (sorry)
Well, when the user change a value will be possible that others fields or layout change in according, so it's mandatory to re-drawn whole table.
However, as you can see through the screenshot, if the user click another menu node the main tab have to clear itself and load another form as a panel.
I've made other checks, but Servoy Log don't report problems and Performance data don't detect expensive queries.
I'm lost.. :s
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm

Re: Problem with solution model in tabpanel

Postby Andrei Costescu » Mon Apr 30, 2012 3:30 pm

Hmm.
While this happens, during that 15 sec interval do "Dump the current stack/systeminfo" & copy/paste to text file twice (different text files) from the admin page.
Attach the 2 text files here. If you don't have enough time to do it twice, one might be enough...

We'll see then (hopefully) if it's running JS code or something else.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Problem with solution model in tabpanel

Postby sceresini » Mon Apr 30, 2012 3:58 pm

first.txt
First text from admin page
(29.54 KiB) Downloaded 188 times
last.txt
Last text form admin page
(29.25 KiB) Downloaded 183 times

Ok, there are the two file that you have requested.

Thanks for help!!
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm

Re: Problem with solution model in tabpanel

Postby Andrei Costescu » Mon Apr 30, 2012 5:39 pm

Hmm... It seems to be busy in java code. So it either gets stuck or it simply runs slowly.
How much content does the removeAllTabs remove? A lot? Only one tab containing a form with 60 columns/8 rows? Do you have html in them?

If you can provide a sample solution you should create a case for further investigation (mention this forum thread in it as well).
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Problem with solution model in tabpanel

Postby sceresini » Mon Apr 30, 2012 6:07 pm

So, removeAllTabs() remove only one tab, the only that contain form with 60 columns/8 rows. I've no HTML on form, the only 'strange' thing is that each cell had an onAction method on it.
I had make a sample solution, simply drawn a table which have a similary size, where each cell contains a progressive numbers and there are no problem on removeAllTabs(), so I've wait to create a case, but I can't understand which is the thing which cause slowness...
If you want I can provide you this solution but it don't reply the slow run.
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm

Re: Problem with solution model in tabpanel

Postby Andrei Costescu » Mon Apr 30, 2012 6:22 pm

Then it needs some special circumstances to appear.

A solution is only useful if it shows the problem. The thing is that I really can't tell for sure what's happening there. For a similar stack & slowness problem I found a bug reported/solved in Java AWT. But it might not be the same thing... You could try it out with other Java versions but I don't know if it would help. We will need a way to reproduce this in order to investigate further.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Problem with solution model in tabpanel

Postby sceresini » Wed May 02, 2012 9:41 am

Nothing to do.
I had Java 1.6.22, now I've download 1.6.31 but the problem still remains.
I can try with more recent Java version, but if I don't be wrong for Servoy 5.2.12 the optimal java version is 1.6.31....

Thanks a lot Andrei for your ideas, but I've no solutions in mind!! :-(
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm

Re: Problem with solution model in tabpanel

Postby sceresini » Mon May 07, 2012 6:16 pm

Andrei, I've solved the problem!!
I think that it appears when the form with table drawn in Solution Model is loaded in main tab and I click on another menu node that call removeAllTabs().
Now I've write an onHide() function (on form which contain solutionModel table) that add a tab with an empty form before the call to removeAllTabs() and performance problems disappears!
Maybe it's a Servoy bug; if you want I can try to explain you the problem in a better way ...
sceresini
 
Posts: 28
Joined: Tue Feb 21, 2012 3:24 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 4 guests