WinCE5 10x faster than CE6R3
-
Tuesday, April 12, 2011 2:31 PM
Working on some personal project involved a lot of graphics, using BitBlt and Alpha-blend to achieve the look I want.
I finding CE6 taking great amount of time to handle that "C#" code w/P/Invoke.
Created a simple app to measure how much time it take from frame to frame.
//Draw in a new thread !!
private void button5_Click(object sender, EventArgs e)
{
cycle = true;
Thread drawBmp = new Thread(new ThreadStart(this.draw));
drawBmp.Start();
drawBmp.Priority = ThreadPriority.AboveNormal;
}public void draw()
{
Bitmap bm = new Bitmap("\\Program Files\\demo\\Base.png");
Graphics gx = this.CreateGraphics();
//Pen gp = new Pen(Color.Red, 3F);
int x = 0;
Bitmap buffer = new Bitmap(250, 51);
Graphics gfx = Graphics.FromImage(buffer);
long startTime = Environment.TickCount;
while (x < 200)
{
x++;
gfx.Clear(Color.DarkBlue);
gfx.DrawImage(bm, x, 0);
gx.DrawImage(buffer, 10, 100);
}
long endTime = Environment.TickCount;
elapsedTime = endTime - startTime;
textBox1.Invoke(mydelegate);
gfx.Dispose();
buffer.Dispose();
bm.Dispose();
}The 200 draw takes 480ms if Enviroment.TickCount is 1ms per tick !!?? The same code finish in 160ms in Windows CE5, I know that isn't 10x faster, but if I move the mouse while drawing the worst I got was 1850 ms and in winCE5 only got up 180ms. In this http://social.msdn.microsoft.com/Forums/en-US/winembplatdev/thread/03ad5fa4-386e-4398-ba3e-e44690334ee7 thread users talking about why, "The kernel architecture has changed dramatically in CE6 to support the 2GB user application space among other things. As a result, the cache is flushed more aggressively. In your specific case (heavy use of API calls) performance can be worse in CE6."
My question here is what can I do to achieve similar or better performance on my hardware with CE6 ?
- Changed Type Jesse JiangMicrosoft Contingent Staff, Moderator Thursday, April 28, 2011 6:10 AM
All Replies
-
Thursday, April 14, 2011 2:51 AMDifferebt machine has different performance, did you tested them on the same machine?
NEU_ShieldEdge -
Friday, April 15, 2011 12:55 PMYes exactly same hardware, unfortunatly the CE5 image dont have all the component I need, but I finding IE run faster, WMP runs in full screen perfectly smooth, in CE6 cant switch WMP to full screen because frame-rate droop to 3.5 FPS.....

