Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Improving the redrawing that freeze the application

For general discussion related FlowStone

Re: Improving the redrawing that freeze the application

Postby Nowhk » Wed Jan 06, 2016 12:10 pm

Ohhhh damn but WAIT! If I export it as .exe (standalone application) this does not happens :shock:
Its only when I use inside FlowStone environment that windows are frozen!

Why?!?!
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Improving the redrawing that freeze the application

Postby Youlean » Wed Jan 06, 2016 11:35 pm

Hey, I am not any master, especially in Flowstone.. :D

Yep, I didn't understand your question, but my optimizations still apply if you want less CPU usage and smoother redrawing.

Did you try to change setting in Flowstone for navigator performance? Try using "minimal" it should give you better performance.
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Improving the redrawing that freeze the application

Postby nix » Fri Jan 08, 2016 12:24 am

Hey Nowhk man,
The thing is, you have not actually made a redraw.
Delete the redraw module in the schematic u posted,
and what u r doing will still be the same.
Here is one way to draw->
Nowhk redraw.fsm
(166.58 KiB) Downloaded 899 times


What u r doing atm is using the architecture graphics to view within the environment.
As a user that is how it will behave on ur system unless you do something with your graphics card.

Cheer mate
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Improving the redrawing that freeze the application

Postby Nowhk » Sat Jan 09, 2016 12:53 am

Youlean wrote:Did you try to change setting in Flowstone for navigator performance? Try using "minimal" it should give you better performance.

Yeah, this fix the problem! Not sure why FlowStone doesn't use graphic card power even when refresh "frequent", but yes it seems to fix the responsiveness. Thanks.

nix wrote:The thing is, you have not actually made a redraw.
Delete the redraw module in the schematic u posted,
and what u r doing will still be the same.
Here is one way to draw->
Nowhk redraw.fsm

You are using an advanced FS version, and can't open the project (in FL, where I own FlowStone).
But yes man: I do a Redraw. If I remove the module, I can't see the cursors move anymore (at Tick25).

If I remove the Redraw module, they are stopped until I click with mouse on the working area (i.e. invoking a redraw), which is correct.
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Improving the redrawing that freeze the application

Postby Nowhk » Mon Jan 11, 2016 12:16 pm

@Youlean: what's the real purpose (here) on using Redraw Area instead of Redraw.
For what I see, both Redraw and Redraw Area call the "draw" function defined for that View in the linked Ruby codes.

Even if I use one or the other, the def draw i,v function (defined inside the Ruby script that draw the waveform) is always called. This means that every cursor movement (processed by Tick25) redraw also the Waveform (which it shouldn't, since the data inside it changes only when I send to it different [F] values). Also graphically, I can't see any difference with Redraw or Redraw Area.

What are you tried to show to me here Youlean? I don't get it...

Said that: is there a way to avoid the calling of the ruby "draw" method using Redraw module? In this case, at every tick I should redraw only "Cursor" Area, not Waveform, even if both are linked to the same View:

Immagine.png
Immagine.png (110.29 KiB) Viewed 14327 times

As you can see, the float linked to the output of Ruby component is incrementing at every tick, because the def draw i,v function is being called (and I'm using Redraw Area; with Redraw its the same).

redraw exclusive.fsm
(15.5 KiB) Downloaded 886 times
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Improving the redrawing that freeze the application

Postby Youlean » Tue Jan 12, 2016 12:13 am

Unfortunately I don't understand Ruby.

Actually I have done some test and it seam that Redraw and Redraw Area are the same if you don't redraw smaller area than view.

If you wan't to optimize your redrawing of line your can do two things if waveform is static:
1. Redraw only area little before and after line. This is quite tricky to implement because of redraw skipping some sections...
2. Render waveform to a bitmap.

Or do both for ultimate performance!
Youlean
 
Posts: 176
Joined: Mon Jun 09, 2014 2:49 pm

Re: Improving the redrawing that freeze the application

Postby Nowhk » Tue Jan 12, 2016 5:53 pm

Youlean wrote:Actually I have done some test and it seam that Redraw and Redraw Area are the same if you don't redraw smaller area than view.

Can you show to me a little example? Here looks always the same...

Youlean wrote:1. Redraw only area little before and after line. This is quite tricky to implement because of redraw skipping some sections...

:shock: What do you mean with little area before and after line? The cursor?

Another idea I got is to link another prim to Waveform Ruby, and only when I got that value redraw cursor, and literally "return" the function (maybe with a flag variable) before redraw again the waveform (which the code is after the one of the cursor). Uhm...
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 54 guests