Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 13th, 2025, 8:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: TOO MUCH CPU LOAD
PostPosted: August 25th, 2005, 11:56 am 
Offline

Joined: August 25th, 2005, 11:38 am
Posts: 4
Location: ITALY
Hello.

I have dome my first working application whith OPUS PRO. It's a simple analogic clock whith three ends (hours, minutes and seconds). It works pretty but when i start the preview in opus or i run the compiled executable file the cpu load jumps to 100% and the computer is slightly slowed down. The executable requires 25, 26 Mb of ram. I think that is too much for a clock. If someone can help me i can send him the opus project to test.

THANKS

and good work to everybody


Max :D


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


Top
 Profile  
 
 Post subject:
PostPosted: August 25th, 2005, 2:21 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Opus is intended for producing interactive materials, rolling demos and other multimedia applications , not really for system tray utilities or desktop mini-apps - although it has been successfully used for many such applications.

If an animation, video or other element requires it then Opus will use all the available CPU to maintain the smoothest possible output. This is intentional - after all what is the point of having a CPU that you don't use to it's fullest? :wink:

It will co-operatively share the CPU power between other applications if there are any running, at the expense of animation speed.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 26th, 2005, 12:06 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Max,
Indicated CPUload doesn't mean much on a multitasking Operating System, it's the thread priority that matters -- Opus apps run in a normal priority thread and they will move over and make room for any other apps that require cpu cycles.
Using built in transitions will get you the indicated high cpu load, and occasionally I think it can cause a very slight lag in other apps running at the same time (It might be my imagination, of course!) :lol: .
By using scripting and updating the clock hand positions about every 0.1 sec, It isn't difficult to get an indicated 5-20% of indicated cpuload for a clock similar to yours.


But, as Duncan said, it doesn't matter :-)

Paul


Top
 Profile  
 
 Post subject:
PostPosted: August 27th, 2005, 9:43 am 
Offline

Joined: August 25th, 2005, 11:38 am
Posts: 4
Location: ITALY
Thanks to alll.

Dear Paul. if you have downloaded my project you have noticed that i hanven't used animations at all. I only used a loop whithin a smal script to "SETROTATION" angle for the hands position. The most part of the project is occupied by vector graphics definitions. I will try to introduce a small pause in the loop to get a better result. What do you think about my first working app. Any suggestion?

Thank for patience and... sorry for my poor english

MAX :D :lol:


Top
 Profile  
 
 Post subject:
PostPosted: August 27th, 2005, 9:45 am 
Offline

Joined: August 25th, 2005, 11:38 am
Posts: 4
Location: ITALY
ALSO THANKS TO LILLY :oops:


Top
 Profile  
 
 Post subject:
PostPosted: August 27th, 2005, 10:40 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Er - that's my surname - my first name is Duncan, and unless you're a teacher or policeman it's more common to use that! :wink: But thank you anyway.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject: try this one
PostPosted: August 27th, 2005, 9:49 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Max,

try this version of a scripted analogue clock.
The script is very simple and easy to understand.
Compare how it works with your clock.

it polls the OS about every 0.1 second to get the clock update time
-- this keeps the indicated cpu load low.

In the script, wait(0.1) controls the loop speed and consequently the indicated cpu load.
try using wait(0) and see what happens.

cheers

Paul


Top
 Profile  
 
 Post subject:
PostPosted: August 30th, 2005, 1:30 pm 
Offline

Joined: December 25th, 2004, 3:31 pm
Posts: 178
CPU Load is a question which pops up on the Opus forum now and then.

Every Windows application uses a lot CPU power:
    Rip a Music CD in iTunes
    Play a Movie DVD
    Play a game Call of Duty or something
    Play a complex Shockwave or Flash game


They all use the CPU to the max, that's why you have a CPU, it's not going to burn out or anything so don't worry about it.

Opus is a development environment for multimedia applications. If you wish to create utilities I suggest you use Microsoft VB or RealBasic http://www.realbasic.com/ as they are much better suited to this.

Also for multi-tasking the introduction of Hyper Treading and Dual Core CPUs from Intel and AMD will see an improvement in this area and Opus application should run even better. Also a question for Duncan is Opus optimised for HT and Dual Core CPUs?


Joe


Top
 Profile  
 
 Post subject:
PostPosted: August 30th, 2005, 2:06 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
josephroddy wrote:
is Opus optimised for HT and Dual Core CPUs?

Opus is a multi-threaded application so can benefit from HyperThreading.
There is no specific optimisation for multi-processors as there is no magic way to spilt the workload - the player cannot "know" in advance what you want to do.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 31st, 2005, 10:09 am 
Offline

Joined: August 25th, 2005, 11:38 am
Posts: 4
Location: ITALY
THANKS TO ALL AND EXPECIALLY TO PAUL.

This is the case that demostrate how the same project can change whith the appropriate script command. I inckude the OROL.imp my first project without any correction. It's CPU LOAD is constantly set to 100%. The second project is se same of OROL.imp but is named OROL2.imp adn i have changed the script as suggested by Paul. The result is a CPU LOAD of max 25%. A great result. In my first script the controlling scripts are nested into the ORELAN SECONDILAN and MINUTILAN vector objects. To update se System time i used a LOOP, bad and cpu consuming choice. In the second project there is a unique script that do the same job but using a sort of WHILE DO instruction. Ok today i have learned something new. Happy day to everyone.

MAX :lol: :lol: :P :P


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


Top
 Profile  
 
 Post subject:
PostPosted: September 8th, 2005, 5:25 pm 
Offline

Joined: December 25th, 2004, 3:31 pm
Posts: 178
Hi,

The clock demo is cool, I like it a lot.

I'm currently creating a game within Opus and on one of the pages I want a timer to time the user while they complete a quiz. The quiz is on a page withing the publication so I can't use the <PUBLICATION_TIME> variable as it times the entire publication not just the page.

I'm interested in knowing what's the best way of doing this while keeping the CPU load low as I want the game to be fluid.


Joe


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 15 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