Ooh that is a good point! My application is for now only drawing on the Canvas but all the pre-processing of the shapes etc is done on the same thread. Even though it always has been in the plan to separate everything in correct threads, it's still to be done. That could be enough to solve our current slowness we have (250ms for a drawing, some path to draw and fill).
Thanks for the hint! On Tue, Jul 17, 2012 at 10:38 PM, Tossing, Chris <chris.toss...@usa.g4s.com>wrote: > We don't use a profiler with M4A, so I don't have one to suggest, but > performance problems can many times be due to performing CPU-intensive > operations on the UI thread. If you are doing that, I strongly suggest you > don't. Any kind of complex calculation or database access should be done > using a background thread - a mechanism such as > ThreadPool.QueueUserWorkItem(...) works well for us. > http://msdn.microsoft.com/en-us/library/system.threading.threadpool.queueuserworkitem.aspx > > One important gotcha is that you need to call Context.RunOnUiThread(...) > when updating the UI from the background thread. > > Chris Tossing > Software Engineer > G4S Technology Software Solutions LLC > Direct Dial: +1 (781) 457-0779 > Cell: +1 (847) 942-0359 > chris.toss...@usa.g4s.com > www.1f.com > 21 North Avenue, Burlington, Massachusetts 01803 USA > > Please consider the environment before printing this email > > > -----Original Message----- > From: monodroid-boun...@lists.ximian.com [mailto: > monodroid-boun...@lists.ximian.com] On Behalf Of gpe > Sent: Tuesday, July 17, 2012 10:45 AM > To: monodroid@lists.ximian.com > Subject: [mono-android] Profiling application > > Hello, > I have never done any extensive profiling (performance analysis) work and > still don't really need it actually. But as my application is running too > slowly I would like to spot the caveats of my code. It could be as well be > a > problem of memory as processor usage. > > In Visual Studio (2010) I saw this menu called "Analyze" which allow to > trace memory allocations and processor time. This is really nice but I do > not see any way to make it work with Monodroid. > > On Android it seems like I should use Traceview. But again I do not know if > it's even possible with Monodroid (Until now my attempts were > unsuccessful). > > > What do you use to analyze the performance of your code? > > -- > View this message in context: > http://mono-for-android.1047100.n5.nabble.com/Profiling-application-tp5710923.html > Sent from the Mono for Android mailing list archive at Nabble.com. > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid > > > > The details of this company are as follows: > G4S Technology Limited, Registered Office: Challenge House, International > Drive, Tewkesbury, Gloucestershire GL20 8UQ, Registered in England No. > 2382338. > > This communication may contain information which is confidential, personal > and/or privileged. > > It is for the exclusive use of the intended recipient(s). > If you are not the intended recipient(s), please note that any > distribution, forwarding, copying or use of this communication or the > information in it is strictly prohibited. > > Any personal views expressed in this e-mail are those of the individual > sender and the company does not endorse or accept responsibility for them. > > Prior to taking any action based upon this e-mail message, you should seek > appropriate confirmation of its authenticity. > > This e-mail has been scanned for all viruses by MessageLabs. > _______________________________________________ > Monodroid mailing list > Monodroid@lists.ximian.com > > UNSUBSCRIBE INFORMATION: > http://lists.ximian.com/mailman/listinfo/monodroid >
_______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid