Skip to content

Commit

Permalink
change low cpu delay to 1 usec, should make editor smoother and not r…
Browse files Browse the repository at this point in the history
…eally use

a lot more cpu. Fixes #11030
  • Loading branch information
reduz committed Nov 18, 2017
1 parent ebbe2bd commit ca19403
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,8 @@ bool Main::iteration() {
return exit;

if (OS::get_singleton()->is_in_low_processor_usage_mode() || !OS::get_singleton()->can_draw())
OS::get_singleton()->delay_usec(16600); //apply some delay to force idle time (results in about 60 FPS max)
//OS::get_singleton()->delay_usec(16600); //apply some delay to force idle time (results in about 60 FPS max)
OS::get_singleton()->delay_usec(1000); //apply some delay to force idle time (results in about 60 FPS max)
else {
uint32_t frame_delay = Engine::get_singleton()->get_frame_delay();
if (frame_delay)
Expand Down

5 comments on commit ca19403

@reduz
Copy link
Member Author

@reduz reduz commented on ca19403 Nov 18, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Calinou
Copy link
Member

@Calinou Calinou commented on ca19403 Nov 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that the problem probably lies in the redraw checker, rather than the FPS limit. A FPS limit of 125 (8000 µs sleep) should be more than adequate for smooth GUI operation (1000 FPS is overkill for this). The editor is smooth when using Update Always, even if the actual framerate isn't very high (around 80).

@akien-mga
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted with d40b182.

@djrm
Copy link
Contributor

@djrm djrm commented on ca19403 Nov 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would have been interesting to leave it for beta to see if other people have problems, i personally dont have any.

@volzhs
Copy link
Contributor

@volzhs volzhs commented on ca19403 Nov 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same problem with @tagcup
editor is extremely unresponsive, when switching between running game and editor, resizing godot editor, etc..

Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
GeForce GTX 670
Ubuntu 16.04

Please sign in to comment.