New topic: APP stall/lock when a sub/fun requires a long execution time
<http://forums.realsoftware.com/viewtopic.php?t=47956> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message gecomail Post subject: APP stall/lock when a sub/fun requires a long execution timePosted: Thu May 23, 2013 5:34 am Joined: Tue Oct 25, 2011 4:28 am Posts: 53 hi, i have this problem, i have a webpage with a webListbox. in action of webButtonA i call subPopulateListbox this sub, retrieve a lot of records from mysql db (mysql is on the same pc) number of records retrieved are approximately 5000 the sub employ 10/20 seconds and in this time populate the webListBox. if i am in the same network all work fine, if i am out of network (and launch the application from outside ) when the app call subPopulateListbox the app seems locked and the client browser is in stall. if i connect to the server with RDP when run subPopulateListbox i see in the task manager that the app use 98% of cpu for a lot of seconds, then the cpu use go to normal index like 3 to 10% , but the client browser is lock/stall..?? i know that i use a webTimer to launch subPopulateListbox but i think that is not the best system... can anyone help me ???? tnx ...... Top Specialised Post subject: Re: problem with sub/function that require a long execution Posted: Thu May 23, 2013 6:52 am Joined: Thu Aug 26, 2010 6:57 am Posts: 565 Location: Sydney Australia Can you paginate the data or restrict it by adding search functionality? I cant imagine you need 5000 records at a time. Try using SQL's limit to restrict returned records SELECT * FROM `your_table` LIMIT 0, 10 'This will display the first 10 results from the database. SELECT * FROM `your_table` LIMIT 5, 5 'This will show records 6, 7, 8, 9, and 10 Or "LIKE" to return records that are like text a user puts in a text field SELECT * FROM `your_table` WHERE somevalue LIKE '%mytextfield.text%' 'This will return a limited recordset _________________ Regards Chris Musty http://www.specialised.net.au ----------------------------------------------- if date.shortdate >= 4/6/2013 then msgbox "I am using Xojo - YAY!!!" else msgbox "I am still using RS 12r2.1 - BOO!!!" end if Win 8 Pro, Ubuntu 13.04, Mint and Debian(gnome and KDE) AWS for Hosting and TKL for AMI's Top gecomail Post subject: Re: APP stall/lock when a sub/fun requires a long execution Posted: Thu May 23, 2013 7:08 am Joined: Tue Oct 25, 2011 4:28 am Posts: 53 yes i can restrict... i can show a lot of records... i can use webTimer ... etc etc but this is a lot of code that i must write !!! (if rs work fine i don't need escamotage/retraction!) my first ask is ... why in lan this work fine and from wan not...?? (the reply will be LATENCY) other my ask is ... i use rsWeb because programming must be simple for me ?? or i must complete with code the problems or unmanaged and undocommented bugs of RS web Edition ??? tnx to all. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
