big slowness when run to preview a form

hi guys, i have a form in multiple records view… simple data around 10 fields
problem is when i work on this project it takes too long (around 15-20+ seconds) for reach time i hit run to see the form in the development area!!
i have most of those fields as foreign keys from another table in the same database (mysql - localhost_ it this the cause? how i can improve the speed please?

it is more than 50 seconds to load this form guys! i also have security and log activated, but not deployed to be used yet… so don’t know really why this slowness!!

please anybody has an answer for this?
i have only 2 tables and around 10 tables to have the data from them, 2 tables has primary keys (each one) and around 10 foreign keys that are the PK in those small tables
this is the only thing that happens, why it takes around 50-60 seconds until the loads a form in the development environment?

  • i made all tables using InnoDB
  • i did make an index in all small tables that has the data as foreign keys (select list feeding)
    what else can i do? my form is in multiple entry mode and it takes around a full minute to load! this is not useful at all
    any idea?

guys, it is really annoying see this image, is this acceptable for one application that is querying one table with 10 fields!
i have the fields as 1,2,3 ,4 ,5 because they are foreign keys here and a primary in the other small tables (which feeding the data to this grid app table)
i have also the security module and the log module activated, but not used yet cz i didn’t deply it yet

please see this image

any idea is appreciated

scslow.jpg

What kind of reaction do you expect? There’s no way we can judge what’s going on besides that it takes very long. Check the amount of tables and fields. The compilation process can be increased if you can set filters on your database connection so that unneccessary tables/fields are not processed. Besides that, we are not constantly watching the forum for posts to appear, be a bit patient please.

thanks Albert, I’m just listing what i’ve done and what is going on, so you can understand the issue better!
please, just imagine a simple gird pointing to a table that is 10 fields, and it has 15 records only!!
1- the fields are foreign keys from another small tables (they are primary in the other tables) - basically all are 1, 2 in values…
2- i’ve indexed all primary fields in the other small tables
3- i’ve made all tables as innodb, not myisam
4- log and security are activated, but i didn’t deploy them yet
5- i have the same table in a from application and it is doing the same thing and takes around 50-60 seconds to view the form/grid in develpment enviornment (form in mulipule records)
6- i have the menu application with this project and it is fine, just so fast can open without any delay! also can load applications to review from the menu itself so fast,

thats why i am saying it is the code generation problem

please advise

[QUOTE=itsme3;24030]thanks Albert, I’m just listing what i’ve done and what is going on, so you can understand the issue better!
please, just imagine a simple gird pointing to a table that is 10 fields, and it has 15 records only!!
1- the fields are foreign keys from another small tables (they are primary in the other tables) - basically all are 1, 2 in values…
2- i’ve indexed all primary fields in the other small tables
3- i’ve made all tables as innodb, not myisam
4- log and security are activated, but i didn’t deploy them yet
5- i have the same table in a from application and it is doing the same thing and takes around 50-60 seconds to view the form/grid in develpment enviornment (form in mulipule records)
6- i have the menu application with this project and it is fine, just so fast can open without any delay! also can load applications to review from the menu itself so fast,

thats why i am saying it is the code generation problem

please advise[/QUOTE]

I’m not saying it’s not a code generation problem. Sometimes I have issues and I solve it by simply creating a new application under a different name and redo from start. It useually goes faster than trying to find the one switch which is causing the problem. Macro code is then a matter of cut and paste.
What I do know is that large tablesets and number of fields can significantly slow down compilation performance. I had to set filters to reduce the working tableset. So I don’t mean the number of fields in your form, but in your connection.
There’s the limitation of my reaction. I cannot see what’s going on and advise you to get into contact with SC support to try to fix your issue. If it’s a bug you can always get into contact as a ‘new user’.

i understnad and appreciate your reply Albert, but this way wil take ages for me to finish one project, with each change i must wait 1 minute to see it! and to create a new one with all those auto selection (for foriegn keys to get the primary keys from other tables) is a hell, with toolbar alignments, changes and settings!!!

sc problem in suppost is the slowness as well, last time when i was yet trying the system i sent them important note, then they replied me after 2 months when i already bought the sc and working on it, almost forgot that problem that faced me in that time!!!

this is not good for sc

also, (out of the topic, but related somehow) how to display simple records count in the gird? just simple i have 15 record, some of them have similar values in 1 field or 2 fields, i just want to quantity of those fields… “count” but here in sc it is necessary to group by to go into summary, i don’t want to group by, if i group by one value in the gird, it will change the layout of the gird and show me separated records, which is ugly, how i can make sumarry things without doing a group by!? i am yet exploring but since it takes 1 minute to each change and try i guess it will take till evening to find out :frowning:

this is not good for sc

also, (out of the topic, but related somehow) how to display simple records count in the gird? just simple i have 15 record, some of them have similar values in 1 field or 2 fields, i just want to quantity of those fields… “count” but here in sc it is necessary to group by to go into summary, i don’t want to group by, if i group by one value in the gird, it will change the layout of the gird and show me separated records, which is ugly, how i can make sumarry things without doing a group by!? i am yet exploring but since it takes 1 minute to each change and try i guess it will take till evening to find out :frowning:

I can’t change things I have no influence on. We have created large projects with hundreds of applications and have no issues regarding speed. Changes on the screen while developing sometimes occur, but useually it’s because of apache creating too many threads and eating all the system memory. We useually logout of scriptcase, restart apache/mysql and we’re off again.

To your second question, record count is a default value in your grids and is part of your toolbar. If you want your own you need to perform the select count in one of the events to get that value and put it in a custom field or in your banner. If you have more than one count you can only do so by using group by, but in sql there’s no other way.

thanks again Albert

I created new grid to the same table (innoDB with 10 foreign keys) and all was fast once created… problem started when i start adding the "lookup > automatic> so to give me the values from the other table instead of the key…and hence, each field i change to lookup automatic and configure the table sql statement, it slows… once finished the 10 fields i reached to generation time 1:40 min!! which is not good at all! i can’t work like that!!

what is the best practice to use the foreign key/primary key in sc without having this much slowness when viewing the project in the development mode?

i understand your answer for the second question, i saw the rows count… i guess my problem is in the summary, so i want to give me the summary that counts similar values of the the displayed rows and gives a quantity number… that is fine, but if i make the count for all fields, then i have to group by (sc) all fields! which makes the grid really ugly to display!!

can i keep the grid as is, show all the values, normally like there is no group by rule assigned at all… then make the summary work so it will give me some calculations for the fields in this grid? any work around? why to display it then calculate anyway!! since now, from early morning (it is 6:30pm here) and i hardly created 2 applications, one form and one grid, hence i got rid of that and very angry, cant wait forever each time i want to view slight change!!!

The automatic lookup is slowing down? Try to embed the lookup in your main query using a join. Then the lookup will become a part of the result set. Other option is not to use a lookup but to do it manually. In the onrecord you can perform the query yourself and fill a custom field. I know that these are work-arounds but …

hope this helps.

[QUOTE=itsme3;24038]thanks again Albert

I created new grid to the same table (innoDB with 10 foreign keys) and all was fast once created… problem started when i start adding the "lookup > automatic> so to give me the values from the other table instead of the key…and hence, each field i change to lookup automatic and configure the table sql statement, it slows… once finished the 10 fields i reached to generation time 1:40 min!! which is not good at all! i can’t work like that!!

what is the best practice to use the foreign key/primary key in sc without having this much slowness when viewing the project in the development mode?

i understand your answer for the second question, i saw the rows count… i guess my problem is in the summary, so i want to give me the summary that counts similar values of the the displayed rows and gives a quantity number… that is fine, but if i make the count for all fields, then i have to group by (sc) all fields! which makes the grid really ugly to display!!

can i keep the grid as is, show all the values, normally like there is no group by rule assigned at all… then make the summary work so it will give me some calculations for the fields in this grid? any work around? why to display it then calculate anyway!! since now, from early morning (it is 6:30pm here) and i hardly created 2 applications, one form and one grid, hence i got rid of that and very angry, cant wait forever each time i want to view slight change!!![/QUOTE]

Albert, here is the solution, believe me today since 8 am until 8 pm i am trying things :slight_smile: :slight_smile: changed everything including tried all versions of xampp but no use

what i did? ok i simply created new connection and changed the “localhost” to 127.0.0.1 and it works! ip is much much faster, yes it opens this form and the gird in 2 seconds instead of 1.30 mins, i have my hosts file and dns all ok but seems sc have difficulty in this part or something…

i sent you PM Albert, please see it thanks in advanced, thanks for everything, and always :slight_smile: :slight_smile:

[QUOTE=itsme3;24040]Albert, here is the solution, believe me today since 8 am until 8 pm i am trying things :slight_smile: :slight_smile: changed everything including tried all versions of xampp but no use

what i did? ok i simply created new connection and changed the “localhost” to 127.0.0.1 and it works! ip is much much faster, yes it opens this form and the gird in 2 seconds instead of 1.30 mins, i have my hosts file and dns all ok but seems sc have difficulty in this part or something…

i sent you PM Albert, please see it thanks in advanced, thanks for everything, and always :slight_smile: :)[/QUOTE]

Curious. Some delay could be normal, but 1.30 min is totaly insane. Has you tried to profile it using Web Developers tools, to see where most time is spent?

hi Giu, no at all, not familiar with what you said :slight_smile: but really changing it into IP instead of “localhost” changed everything back to reasonable and so fast even, i am happy now, trying to solve the other puzzles :slight_smile:

any idea if i can digg into “sort” and “columns” buttons so to select exactly what allowing end-user to do?

[QUOTE=itsme3;24042]

any idea if i can digg into “sort” and “columns” buttons so to select exactly what allowing end-user to do?[/QUOTE]

Sorry,don’t understand exactly what you mean

in the toolbar, you can place a button that says “columns” which allow the end user to select whatever columns he wants when displaying the gird… by default all columns are there, so the user can can remove them from the view and can re-add them or select what he want for the grid to view… that is fine, is there a way to disable him from removing some exact columns from the view? same thing to sort (advanced sorting items) i know this is not important, therefore it will add value if it is possible, i searched the sc but couldn’t find it…

AFAIK it is only meant for end-user option to create a view for export. You can’t save the settings and you can’t read them from the application. So there’s not much use besides export.

yes albert i noticed that, it is like dynamic table gone once refreshed :slight_smile:

thanks :slight_smile: