PC Review


Reply
Thread Tools Rate Thread

Slow UI Creation

 
 
LitriNet
Guest
Posts: n/a
 
      13th Nov 2010
Hi everyone, i don't have experience with windows mobile but i
development an application using windows mobile 6 , sql server compact
and i have a htc hd2 for testing the application.

My problem is that the first time the application start,it's running
with the normal speed and work rightly but if i stop the application
and start other time i don't know but starts running slowly, i can
see how the UI are being created slowly, and when i click on a button
there are a delay. I need to restart the pda to get a normal running
other time. I looking for lossing memory or something else but i don't
find the problem are..

Can someone help? or suggest me where should I looking for?
 
Reply With Quote
 
 
 
 
MarkusSchaber
Guest
Posts: n/a
 
      15th Nov 2010
Hi, LitriNet,

On 13 Nov., 17:16, LitriNet <jomar...@gmail.com> wrote:
> Hi everyone, i don't have experience with windows mobile but i
> development an application using windows mobile 6 , sql server compact
> and i have a htc hd2 for testing the application.
>
> My problem is that the first time the application start,it's running
> with the normal speed and work rightly but if i stop the application
> and start other time *i don't know but starts running slowly, i can
> see how the UI are being created slowly, and when i click on a button
> there are a delay. I need to restart the pda to get a normal running
> other time. I looking for lossing memory or something else but i don't
> find the problem are..
>
> Can someone help? or suggest me where should I looking for?


Maybe when you stop the application, it does not free all ressources,
or some threads keep on running and spinning for the CPU?

Markus
 
Reply With Quote
 
 
 
 
LitriNet
Guest
Posts: n/a
 
      15th Nov 2010
On Nov 15, 8:54*am, MarkusSchaber <m...@schabi.de> wrote:
> Hi, LitriNet,
>
> On 13 Nov., 17:16, LitriNet <jomar...@gmail.com> wrote:
>
> > Hi everyone, i don't have experience with windows mobile but i
> > development an application using windows mobile 6 , sql server compact
> > and i have a htc hd2 for testing the application.

>
> > My problem is that the first time the application start,it's running
> > with the normal speed and work rightly but if i stop the application
> > and start other time *i don't know but starts running slowly, i can
> > see how the UI are being created slowly, and when i click on a button
> > there are a delay. I need to restart the pda to get a normal running
> > other time. I looking for lossing memory or something else but i don't
> > find the problem are..

>
> > Can someone help? or suggest me where should I looking for?

>
> Maybe when you stop the application, it does not free all ressources,
> or some threads keep on running and spinning for the CPU?
>
> Markus


Hi Markus,

In my Main method i have a finally where I kill the proccess, i don't
know if this is the better option

finally
{
Application.Exit();

uint id = uint.MinValue;
List<ProcEntry> list_ = new List<ProcEntry>();
if (PPVBeach.ProcessEnumerator.Enumerate(ref list_))
{
for (int i = 0; i < list_.Count; i++)
{
if (list_[i].ExeName.ToUpper().Contains("BEACH"))
{
id = list_[i].ID; ;
break;
}
}

if (id != uint.MinValue)
{
ProcessEnumerator.KillProcess(id);
}
}
}

Thanks
 
Reply With Quote
 
Brian
Guest
Posts: n/a
 
      15th Nov 2010
On Nov 15, 1:51*am, LitriNet <jomar...@gmail.com> wrote:
> On Nov 15, 8:54*am, MarkusSchaber <m...@schabi.de> wrote:
>
>
>
>
>
>
>
>
>
> > Hi, LitriNet,

>
> > On 13 Nov., 17:16, LitriNet <jomar...@gmail.com> wrote:

>
> > > Hi everyone, i don't have experience with windows mobile but i
> > > development an application using windows mobile 6 , sql server compact
> > > and i have a htc hd2 for testing the application.

>
> > > My problem is that the first time the application start,it's running
> > > with the normal speed and work rightly but if i stop the application
> > > and start other time *i don't know but starts running slowly, i can
> > > see how the UI are being created slowly, and when i click on a button
> > > there are a delay. I need to restart the pda to get a normal running
> > > other time. I looking for lossing memory or something else but i don't
> > > find the problem are..

>
> > > Can someone help? or suggest me where should I looking for?

>
> > Maybe when you stop the application, it does not free all ressources,
> > or some threads keep on running and spinning for the CPU?

>
> > Markus

>
> Hi Markus,
>
> In my Main method i have a finally where I kill the proccess, i don't
> know if this is the better option
>
> finally
> {
> * * Application.Exit();
>
> * * uint id = uint.MinValue;
> * * List<ProcEntry> list_ = new List<ProcEntry>();
> * * if (PPVBeach.ProcessEnumerator.Enumerate(ref list_))
> * * {
> * * * * for (int i = 0; i < list_.Count; i++)
> * * * * {
> * * * * * * if (list_[i].ExeName.ToUpper().Contains("BEACH"))
> * * * * * * {
> * * * * * * * * id = list_[i].ID; ;
> * * * * * * * * break;
> * * * * * * }
> * * * * }
>
> * * * * if (id != uint.MinValue)
> * * * * {
> * * * * * * ProcessEnumerator.KillProcess(id);
> * * * * }
> * * }
>
> }
>
> Thanks


Are you certain that the code after Application.Exit is executing?
Either way, I've never seen an app close down it's threads this way.
You should use some flags to manage the threads. So, inside your
child threads all the work is done inside a loop, like so:

bool killthread = false;

while(!killthread)
{
//do thread work here
thread.sleep(100)

}

//dispose of any resources

Then, when it is time to close out the application you can set
killthread = true for all of the child processes in your main thread.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Differentiate between drag & drop email task creation and normal task creation Mohit Microsoft Outlook Program Addins 1 18th Apr 2007 05:54 AM
email stat creation or html creation??? lafnsu Freeware 0 20th Jan 2005 10:44 PM
Slow Opening Files, Explorer Slow, Context click slow FIXED!!! =?Utf-8?B?RG9taW5pcXVl?= Windows XP Help 5 6th Jan 2005 03:33 AM
Form creation exception error; swapping delaying object creation? Fiona McBride Microsoft Dot NET 0 20th Apr 2004 09:58 AM
Slow, slow, slow, slow to load pages steve Windows XP Internet Explorer 3 8th Mar 2004 07:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:22 PM.