locked
Loading tiff file pages in thumbnailview

    Question

  • Hello,

    can any one tell me how to perform multi tasking or parallel tasking in win 8 metro app?????

    Wednesday, February 20, 2013 9:17 AM

Answers

  • Hi,

    You can use Asynchronous programming with html5/javascript in Windows Store app. Using asynchronous programming helps your apps stay responsive when they do work that might take an extended amount of time. For example, an app that downloads information from the Internet might spend several seconds waiting for the information to arrive. If you use a synchronous method on the UI thread to retrieve the information, the app is blocked until the method returns. The app won't respond to user interaction, and because it seems non-responsive, the user might become frustrated. A much better way is to use asynchronous programming, where the app continues to run and respond to the UI while it waits for an operation to complete.

    #Asynchronous programming (Windows Store apps) (Windows)

    http://msdn.microsoft.com/en-us/library/windows/apps/hh464924.aspx


    Roy
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Song Tian Wednesday, February 27, 2013 10:48 AM
    Thursday, February 21, 2013 2:46 AM
  • Hi cauveri,

    How do you retrive those large tiff images, are you using winjs.xhr call to retrieve them from internet web? For tiff images that are already in your app's local folder or app folder, are they loaded quickly in your app? I think for local image file resources, it should be much quicker to load and present in your windows store app's UI.

    If the main performance gap and latency is due to network transfer of the large image files, you can consider using the background transfer component which is designed for large file transfer (downloading from external web) in background even if your windows store is suspended.



    #Transferring data in the background (Windows Store apps using JavaScript and HTML) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/hh452979.aspx

    #Background Transfer sample
    http://code.msdn.microsoft.com/windowsapps/Background-Transfer-Sample-d7833f61


    and for other operations or tasks you want to execute when your app is suspended or even terminated, you can have a look at the background task component of windows store app:




    #Supporting your app with background tasks (Windows Store apps using JavaScript and HTML) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/Hh977046.aspx

    #Background task sample
    http://code.msdn.microsoft.com/windowsapps/Background-Task-Sample-9209ade9


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Song Tian Wednesday, February 27, 2013 10:48 AM
    Thursday, February 21, 2013 5:20 AM
    Moderator

All replies

  • Hi,

    You can use Asynchronous programming with html5/javascript in Windows Store app. Using asynchronous programming helps your apps stay responsive when they do work that might take an extended amount of time. For example, an app that downloads information from the Internet might spend several seconds waiting for the information to arrive. If you use a synchronous method on the UI thread to retrieve the information, the app is blocked until the method returns. The app won't respond to user interaction, and because it seems non-responsive, the user might become frustrated. A much better way is to use asynchronous programming, where the app continues to run and respond to the UI while it waits for an operation to complete.

    #Asynchronous programming (Windows Store apps) (Windows)

    http://msdn.microsoft.com/en-us/library/windows/apps/hh464924.aspx


    Roy
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Song Tian Wednesday, February 27, 2013 10:48 AM
    Thursday, February 21, 2013 2:46 AM
  •  Hello Roy,

    i'm using VS 2012 and C# for developing metro app.

    using task to retrieve pages of tiff file.

    but it's taking more time for large tiff files near about 5 mins.

    I want to minimize it.

    can you tell me how can i achieve it in seconds?

    Thanks and regards,

    Cauveri

    Thursday, February 21, 2013 3:57 AM
  • Hi cauveri,

    How do you retrive those large tiff images, are you using winjs.xhr call to retrieve them from internet web? For tiff images that are already in your app's local folder or app folder, are they loaded quickly in your app? I think for local image file resources, it should be much quicker to load and present in your windows store app's UI.

    If the main performance gap and latency is due to network transfer of the large image files, you can consider using the background transfer component which is designed for large file transfer (downloading from external web) in background even if your windows store is suspended.



    #Transferring data in the background (Windows Store apps using JavaScript and HTML) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/hh452979.aspx

    #Background Transfer sample
    http://code.msdn.microsoft.com/windowsapps/Background-Transfer-Sample-d7833f61


    and for other operations or tasks you want to execute when your app is suspended or even terminated, you can have a look at the background task component of windows store app:




    #Supporting your app with background tasks (Windows Store apps using JavaScript and HTML) (Windows)
    http://msdn.microsoft.com/en-us/library/windows/apps/Hh977046.aspx

    #Background task sample
    http://code.msdn.microsoft.com/windowsapps/Background-Task-Sample-9209ade9


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Song Tian Wednesday, February 27, 2013 10:48 AM
    Thursday, February 21, 2013 5:20 AM
    Moderator