Why is the current release of cosmos so slow?

Jan 30, 2012 at 1:48 PM
Edited Jan 30, 2012 at 1:49 PM

Hi guys!

At first thank you for your great work. I realy love it. But, i have a little problem with the speed of cosmos. I am using the lastest release from 22 Jan. and trying to make a GUI, but the graphic is realy slow. When i type VGAScreen.Clear(index), i can see cosmos cleaning the screen pixel by pixel. I have compared it to the PearOS project (i don't know if they are using the lastest release of Cosmos, or an older one), which runs realy fast. At first i thought it is the graphic, which doesn't run proper, but then i i've tried the following code inside the Run method:

int i =0;
while(true) {
    Console.WriteLine(i);
    i++;
}

While the PearOS runs fast, the lastest rlease needs 1/2 - 1/4 seconds until it passes the while loop again. So where comes this behavoir from? Why is Cosmos so slow? Are there any hidden Settings how to speed up Cosmos?

I am using Microsoft Visual Studio 2010 Ultimate + VMWare Player 3.

Thank you! :)

P.s. sry for my bad english... ;)

Coordinator
Jan 30, 2012 at 1:53 PM
> At first thank you for your great work. I realy love it. But, i have a
> little problem with the speed of cosmos. I am using the lastest release
> from 22 Jan. and trying to make a GUI, but the graphic is realy slow.

Dont expect any speed in the near term. Cosmos currently is focused on
maintainability of code, and getting things working. Until we are
complete on the foundation no optimizations will be worked on as they
distract from the main line of current work. Much of the slowness is due
also to the debugstub which needs more work before it is optimized.
Coordinator
Jan 30, 2012 at 1:55 PM
If you want to get speed, you can disable the debugging by switching to a Release build mode.

On Mon, Jan 30, 2012 at 3:53 PM, kudzu <notifications@codeplex.com> wrote:

From: kudzu

> At first thank you for your great work. I realy love it. But, i have a
> little problem with the speed of cosmos. I am using the lastest release
> from 22 Jan. and trying to make a GUI, but the graphic is realy slow.

Dont expect any speed in the near term. Cosmos currently is focused on
maintainability of code, and getting things working. Until we are
complete on the foundation no optimizations will be worked on as they
distract from the main line of current work. Much of the slowness is due
also to the debugstub which needs more work before it is optimized.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 30, 2012 at 2:01 PM

Oh yes, it's the debugstub that makes it so slow. Running as 'Release' works fine, for the beginning ist is ok. :)

Developer
Jan 30, 2012 at 2:05 PM

There is also a small overhead due to the current VGA screen using delegates to setup the get/set pixel methods. Delegates are quite a bit slower than if you were to call the method they point to directly.

Jan 31, 2012 at 6:53 PM
HyperSpace wrote:

Hi guys!

At first thank you for your great work. I realy love it. But, i have a little problem with the speed of cosmos. I am using the lastest release from 22 Jan. and trying to make a GUI, but the graphic is realy slow. When i type VGAScreen.Clear(index), i can see cosmos cleaning the screen pixel by pixel. I have compared it to the PearOS project (i don't know if they are using the lastest release of Cosmos, or an older one), which runs realy fast. At first i thought it is the graphic, which doesn't run proper, but then i i've tried the following code inside the Run method:

int i =0;
while(true) {
    Console.WriteLine(i);
    i++;
}

While the PearOS runs fast, the lastest rlease needs 1/2 - 1/4 seconds until it passes the while loop again. So where comes this behavoir from? Why is Cosmos so slow? Are there any hidden Settings how to speed up Cosmos?

I am using Microsoft Visual Studio 2010 Ultimate + VMWare Player 3.

Thank you! :)

P.s. sry for my bad english... ;)

I wrote our VGA code to be very very fast. Now keep this in mind. We have double buffer so we have to draw everything to a buffer and then draw the entire buffer to the screen, you would think that would kill the OS and make it so slow it would be crazy. But it didn't we dont even see a speed difference. Cosmos is very fast, its how you write your code that makes the difference. =), you are welcome to use our VGA code if you would like. Hope it helps - Matt

P.S. and a trick is to change "Debug" to "Release". You will really notice a speed difference =), and we do use the current source code.

Coordinator
Feb 1, 2012 at 7:01 AM
Keep in mind that specifying the Release mode will make it impossible to use the (very useful) debugger...


On Tue, Jan 31, 2012 at 8:53 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

HyperSpace wrote:

Hi guys!

At first thank you for your great work. I realy love it. But, i have a little problem with the speed of cosmos. I am using the lastest release from 22 Jan. and trying to make a GUI, but the graphic is realy slow. When i type VGAScreen.Clear(index), i can see cosmos cleaning the screen pixel by pixel. I have compared it to the PearOS project (i don't know if they are using the lastest release of Cosmos, or an older one), which runs realy fast. At first i thought it is the graphic, which doesn't run proper, but then i i've tried the following code inside the Run method:

int i =0;
while(true) {
Console.WriteLine(i);
i++;
}

While the PearOS runs fast, the lastest rlease needs 1/2 - 1/4 seconds until it passes the while loop again. So where comes this behavoir from? Why is Cosmos so slow? Are there any hidden Settings how to speed up Cosmos?

I am using Microsoft Visual Studio 2010 Ultimate + VMWare Player 3.

Thank you! :)

P.s. sry for my bad english... ;)

I wrote our VGA code to be very very fast. Now keep this in mind. We have double buffer so we have to draw everything to a buffer and then draw the entire buffer to the screen, you would think that would kill the OS and make it so slow it would be crazy. But it didn't we dont even see a speed difference. Cosmos is very fast, its how you write your code that makes the difference. =), you are welcome to use our VGA code if you would like. Hope it helps - Matt

P.S. and a trick is to change "Debug" to "Release". You will really notice a speed difference =), and we do use the current source code.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 1, 2012 at 8:21 AM
mterwoord wrote:
Keep in mind that specifying the Release mode will make it impossible to use the (very useful) debugger...


On Tue, Jan 31, 2012 at 8:53 PM, civilwarrock <notifications@codeplex.com> wrote:

From: civilwarrock

HyperSpace wrote:

Hi guys!

At first thank you for your great work. I realy love it. But, i have a little problem with the speed of cosmos. I am using the lastest release from 22 Jan. and trying to make a GUI, but the graphic is realy slow. When i type VGAScreen.Clear(index), i can see cosmos cleaning the screen pixel by pixel. I have compared it to the PearOS project (i don't know if they are using the lastest release of Cosmos, or an older one), which runs realy fast. At first i thought it is the graphic, which doesn't run proper, but then i i've tried the following code inside the Run method:

int i =0;
while(true) {
Console.WriteLine(i);
i++;
}

While the PearOS runs fast, the lastest rlease needs 1/2 - 1/4 seconds until it passes the while loop again. So where comes this behavoir from? Why is Cosmos so slow? Are there any hidden Settings how to speed up Cosmos?

I am using Microsoft Visual Studio 2010 Ultimate + VMWare Player 3.

Thank you! :)

P.s. sry for my bad english... ;)

I wrote our VGA code to be very very fast. Now keep this in mind. We have double buffer so we have to draw everything to a buffer and then draw the entire buffer to the screen, you would think that would kill the OS and make it so slow it would be crazy. But it didn't we dont even see a speed difference. Cosmos is very fast, its how you write your code that makes the difference. =), you are welcome to use our VGA code if you would like. Hope it helps - Matt

P.S. and a trick is to change "Debug" to "Release". You will really notice a speed difference =), and we do use the current source code.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


True, but I have never had to use the debugger. =). When I run into a problem I just rewrite the code. Thanks - Matt