×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    10

    How to take advantage of Windows Phone 8 multi-core processor?

    Windows Phone 8 devices have multi core processors and I want my app to take advantage of this. I have no idea about making apps use muti-core benifits. I want to know what changes I will have to make in my app. I know that it is complicated but I really want to learn about this. Anybody having idea about this please help.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Multiple cores can execute multiple threads at the same time, it is that simple in any computing environment. Inside a single application, CPU-intensive tasks can benefit from that, like image/audio/video processing.
    From the API point of view it does not differ from WP7 (Thread, ThreadPool are good readings for low level usage, and perhaps BackgroundWorker for higher level).
    Threading is a tool, not a goal. It can not be used for speeding up everything.

  3. #3
    Registered User
    Join Date
    Dec 2011
    Posts
    10

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Why can't it improve speed? I thought multi-core carry out parallel processing.

    Can you explain about threads? When, where and why to use it in a phone app?

    I know about multi-threading but I haven't used it in Phone apps.

    Thanks for replying.

  4. #4
    Registered User
    Join Date
    Dec 2011
    Posts
    10

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    For explaining muti-core processor advantages in game/ application development and also using threads for improving performance can Nokia developers please conduct a webinar for it. This will help us in learning to use threads in games as they require good performance. Also, if threads are used any how it can degrade the performance instead of improving. So, I want to learn where it is appropriate to use it and where it should be avoided.

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    472

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Hi.
    I don't understand your question.
    You say you know multi-threading, but why the problem should be different with a phone ?

    like say wizard_hu_ "Threading is a tool, not a goal. It can not be used for speeding up everything."

    You have two principals reason to use multi-threading :
    1- you make a long action (download a file, compute something,...) which freeze your ui.
    2- you want parallelize actions (create thumbnails, compute an algorithm,...).

  6. #6
    Registered User
    Join Date
    Dec 2011
    Posts
    10

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    I meant that I know how to implement threads but don't know where and when it should be done. Also, there are not much guides available when it comes to implementing threads in phone apps.

    Is it that even if I don't use threading in my apps it will take advantage of multi-core processor as seen in newer phones?

    Thanks for your reply.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Quote Originally Posted by treseq View Post
    I meant that I know how to implement threads but don't know where and when it should be done. Also, there are not much guides available when it comes to implementing threads in phone apps.
    There is no difference between phones and non-phones from this point of view. Whatever guides, articles you find for general multi-threaded algorithms, game engine designs, are also applicable to phone environments.
    So two tips which work for me:
    - do not include "phone" in the search query, because it is not important
    - do include C#, because otherwise you may get many articles about various C++ libraries (like OpenMP), which indeed are not really useful on WP
    Searching for threading in C# games with Google appears to bring many practical readings for example.
    Is it that even if I don't use threading in my apps it will take advantage of multi-core processor as seen in newer phones?
    No, I do not think so. While the various asynchronous event handlers seem to run independently, to my understanding they are executed in the single UI thread, one by one.

  8. #8
    Registered User
    Join Date
    Dec 2011
    Posts
    10

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Thanks a lot wizard_hu_. This kind of answers my question.

    I would like if Nokia developer adds some examples for multi-threaded apps/ games.

    I would like to close this thread now.

  9. #9
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    472

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Quote Originally Posted by wizard_hu_ View Post
    While the various asynchronous event handlers seem to run independently, to my understanding they are executed in the single UI thread, one by one.
    I'm not sure for all async method but for the majority they are executed in an internal thread.
    It's for this reason we must use "Deployment.Current.Dispatcher.BeginInvoke" to report result in UI thread. THis method push an event to UI Thread eventloop.

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Quote Originally Posted by yan_ View Post
    I'm not sure for all async method but for the majority they are executed in an internal thread.
    It's for this reason we must use "Deployment.Current.Dispatcher.BeginInvoke" to report result in UI thread. THis method push an event to UI Thread eventloop.
    Yes, I was over-using "asynchronous" here, without thinking about "async". I meant game code with simple event handlers, like draw, update, pointer events. Anything that goes through the dispatcher.
    If you use the async-await constructs, that involves threading.

  11. #11
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    472

    Re: How to take advantage of Windows Phone 8 multi-core processor?

    Quote Originally Posted by wizard_hu_ View Post
    Yes, I was over-using "asynchronous" here, without thinking about "async". I meant game code with simple event handlers, like draw, update, pointer events. Anything that goes through the dispatcher.
    You can have problem with event too. For example, event of PhotoCamera are called by a diffrerent thread.
    For ecample in this page : http://msdn.microsoft.com/en-us/libr...v=vs.105).aspx you can read
    7. In MainPage.xaml.cs, add the following code to the MainPage class. This code implements the AutoFocusCompleted event handler to write a message to the TextBlock named txtDebug. The BeginInvoke method is required because the UI of the app runs on a different thread.

Similar Threads

  1. Compiling QT Symbian Device Build on multi-core PC
    By DonMorr in forum [Archived] Qt SDKs and Tools
    Replies: 2
    Last Post: 2010-09-23, 13:00
  2. 64 bytes dual-core processor... and Symbian development
    By GeKI in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2006-11-27, 17:26
  3. Mobile Phone Processor Spec
    By daveRichards in forum Mobile Java General
    Replies: 0
    Last Post: 2005-04-21, 17:16
  4. 7610 good phone but it has got bad processor
    By nokia.7610 in forum Symbian
    Replies: 2
    Last Post: 2004-12-26, 22:43
  5. phone processor speed
    By msujee in forum Mobile Java General
    Replies: 2
    Last Post: 2003-11-20, 12:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×