Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 9th, 2025, 9:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Pub brake and slow down.
PostPosted: June 2nd, 2008, 12:52 pm 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
I'm having serious problems with the use of the publications create by the Opus.

I worked a lot during the month and made the pub, but one part of the publication work begins with the brakes, loading CPU grows up to 100% and it is impossible to move the cursor. I use a list box and connection to the database. If you choose items in the list box, the first 8-10 time everything is fine, but then everything starts to brake. More and more. Then the publication becomes impossible to use and had to use emergency exit.

Give, please, what should I change the settings so the pub worked quickly and not slow down?


You do not have the required permissions to view the files attached to this post.

_________________
Opus Pro 5.5
Win XP


Top
 Profile  
 
 Post subject:
PostPosted: June 2nd, 2008, 8:21 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
it sounds like you have an error in a script which causes the program to go into a loop, using more and more CPU until it hangs or runs out of resources.
It is impossible to say what is causing the problem without knowing a bit about the publication.
You can scatter Debug statements around the script to see if you can spot what's going wrong.

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: June 2nd, 2008, 9:31 pm 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
Hi sandyn

Thanks very much for your advice. I use a simple script output of data from DB. It worked excellent previously. But when I added a fields (its now total 9) with the conclusion of images and the date of such a problem.

Code:
var db = new Database("FILEDSN=bsff.dsn");
pr = new Array();

var records = db.ExecuteSQL("SELECT * FROM table3 ORDER BY id DESC");
   
var num_records = records.GetNumberOfRecords();
for (num=0; num< num_records; num++) {
   pr[num] = records.goal;
   records.NextRecord();
}



Maybe the challenge the database query? Indeed, the brakes appear when I click mouse on the list box.


You do not have the required permissions to view the files attached to this post.

_________________
Opus Pro 5.5
Win XP


Top
 Profile  
 
 Post subject:
PostPosted: June 2nd, 2008, 10:31 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Anything that stops inside a 'for' loop will cause the loop to freeze.
This will happen if Opus is waiting for 'records.NextRecord()' to return data from the Record Set.
The result will be the pub will lock up.

Paul


Last edited by Paul on June 2nd, 2008, 10:50 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: June 2nd, 2008, 10:40 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Ignore me -- never read it properly.
I need coffee.

Paul


Top
 Profile  
 
 Post subject:
PostPosted: June 2nd, 2008, 10:49 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
As Sandyn says, you could have errors somewhere. So that may involve quite a bit of work to find the source or sources of a condition causing problems.

Normally if you are using images on the page inside ImageObjects, it will take time to refresh or change image that is shown. I use an action that pre-loads resources on Page show. However, in your case it seems you are trying to manipulate a whole catalog of images in RAM? Of course... that's a lot of processing. I think it is Vista as part of the problem... Vista likes to keep track of things... like always indexing files. Also, lots of swap operations between disk and Ram is likely. You never say in your Profile what your system configuration is. And will your users have same capability.

In your DB query you retrieve all columns and all records. You can find ways to cut that down to only what is needed 'now'. Otherwise, once you have read from the Database into an array, you should not have to read again from the database... just operate on the array. However your Array contains "how many" images at one time?

It may be more efficient to make your SQL statements work to only retrieve the ONE or the few records needed SELECTIVELY.

Since you use a Page array-variable (?), you could also zero out the Array when not being used.
pr.length = 0 ; //then it will be empty


BTW, once you fill an Array with 200 rows by 8 columns, and then later you write to the Array again only 15 rows by 3 columns.... I think the Array will still contain much of the "old data" -- it only overwrites the elements where the new data exists and may not destroy the old values. (someone correct me if I am wrong here)

Cheers,
larry

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: June 2nd, 2008, 10:58 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
added thought.

Since you are using Triggers and Standard actions, it would be a good idea to add an "End Query action" somewhere. I don't know 'where' is best.

( it might be better to "Open" the Database connection ONCE... separately from the Listbox selections actions. Then 'later', CLOSE the DB "ONCE". ... currently I think you are opening many connections to the DB??? )

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: June 3rd, 2008, 4:39 pm 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
Thanks to all.
Lar_123 wrote:
Since you are using Triggers and Standard actions, it would be a good idea to add an "End Query action" somewhere. I don't know 'where' is best.


Lar_123, this may be important, I try it, thank you.

_________________
Opus Pro 5.5
Win XP


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 80 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group