I saw this when the reference to all of the controls is used. Just reference the files required for PDF Viewer instead. Or use the Nuget for the PDF Viewer.
Regards,
Tony
Hi Shompinice,
We suspect this is not an issue and the delay will occur due to the loading process of
the control. Also, Please try the below suggestion and let us know whether it will be useful
https://stackoverflow.com/questions/62210478/why-uwp-apps-take-long-time-to-start
Regards,
Vikram
As the show of the video file, it taking 13s to staying in splashscreen. it is tooooooo long.
Most of the UWP apps only took 1-3s.
作为视频文件的显示,它需要 13 秒才能停留在启动画面中。它太长了。
大多数 UWP 应用只需要 1-3 秒。
附件:splashscreen_c810bf8.zip
(I have done follow the thread
https://stackoverflow.com/questions/62210478/why-uwp-apps-take-long-time-to-start
but nothing changed. the cold loading spent too much time )
Hi Shompinice,
We were able to reproduce the issue, “splash screen takes long time for cold
start” . Currently, we are
validating this issue in our end and we will update the further details on August
04, 2022.
Regards,
Vikram
Hi Shompinice,
We are still analysing the issue "splash screen takes long time for cold start" due to the complexity and we will provide further
validation details on August 08, 2022. We have
analysed this issue by create a simple sample with only using the SfPdfviewer package
but the splash screen takes only 3sec for that sample.
So, We suspect this issue is not because of SfPdfviewer. However, we are analysing
your sample from our end and also please let us know if you find any update in
this issue.
Regards,
Vikram
Any update please?
Hi Shompinice,
Sorry for the inconvenience caused. We are still
validating the issue “splash screen takes long time for cold start”. We suspect that the issue is not due to PDF
viewer control, as a simple app with PDF viewer does not take this long to
load. The delay may be caused by the application code or some other factor
related to the application. We will validate and will provide the details on
August 10, 2022.
Regards,
Vikram
It was me who caused you inconvenience, thank you so much. I had to ask for help because I was not skilled enough to find the cause of the problem. You guys can spend more time looking for the cause of the problem because it looks complicated.
Hi Shompinice,
No problem, It’s our pleasure to help you. We
will validate and update the further details on August 10, 2022.
Regards,
Vikram
Hi Shompinice,
We suspect that the issue is not due to the PDF viewer control, as a simple sample with the PDF viewer does not take too long to load. According to Microsoft documentation (https://docs.microsoft.com/en-us/windows/uwp/debug-test-perf/best-practices-for-your-app-s-startup-performance#reduce-element-count), more number of controls in the XAML will cause long start up time for apps. So, this issue occurs due to the large number of controls used in the XAML of your app. We also created a simple sample with a greater number of controls and cold started the application. The application itself takes too long to load initially.
As suggested by the Microsoft documentation, loading the UI controls that are not visible initially whenever needed might improve the startup time. We suggest you load the controls which are not visible initially using the x:Load or x:DeferLoadStrategy attribute based on your requirements.
Please refer to this documentation from Microsoft.
https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/x-deferloadstrategy-attribute
https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/x-load-attribute
Please let us know if you need any further assistance.
Regards,
Vikram
As you guys suggested, I started experimenting with lazy loading.
When the button circled in red in MainPage.xaml (blue) is pressed, a toolbar pops up, so it doesn't have to load right away. It's in <Grid x:Name = "AnnotationToolbar"> (green)
I added x:DeferLoadStrategy="Lazy"
Correspondingly, I am
private void PopupAnnotationButton_Click(object sender, RoutedEventArgs e)
added
this.FindName("AnnotationToolbar");
But it spent 20+ secounds for cold loading😭
Hi Shompinice,
We have modified the sample that you have provided in which we are lazy loading the topToolbar, AnnotationToolbar, SearchToolbar, and BookmarkGrid and we are realizing the top toolbar, Annotation toolbar, and the search toolbar on the PageLoaded event, and the bookmark grid is realized when the Bookmark button is clicked. By doing this, the deployed application opens within 5 seconds on a cold start. We have attached the modified sample.
Please let us know if you need any further assistance.
Regards,
Imman Kumar P
thank you very much for your help!
Did you change more files than "MainPage.XAML" and "MainPage.XAML.cs"?
I used the text comparison tool to compare my MainPage.XAML, MainPage.XAML.cs and your version. I tried copying your modifications into my file but it doesn't seem to work. So I just selected all your text and replaced mine, but the compilation still fails. I guess you probably modified more than these two files?
One problem is that in my version the arm version can be released, while in yours it fails and can only package the x64 and x86 versions.
eemm, more update?
Hi Shompinice,
We have made the changes in the below files and the same can be downloaded from the attached link.
MainPage.xaml
MainPage.xaml.cs
DeviceFamily-Mobile\MainPage.xaml
https://www.syncfusion.com/downloads/support/directtrac/general/ze/Changes1297898326
Please let us know if you need any further assistance.
Regards,
Mohana Priya R
I have edited the file as shown in the screenshot
but the cold loading takes 20s still.
this is the new file.
https://drive.google.com/file/d/1DDtL7CLe7IlKgkrWVOd92bqHYvssb3eO/view?usp=sharing
--------------------------------------
in the older reply you share a zip file which has modify by you but it cannot create the ARM package
Hi Shompinice,
Currently we are checking your issue
and we will let you know the further details on August 22, 2022.
Regards,
Vikram
Any update ?
Hi Shompinice,
We are still analyzing your issue and we
will update you the further details on August 24, 2022.
Regards,
Vikram
Hi Shompinice,
In the sample that you have provided, some changes were missing in MainPage.xaml.cs file. Please find the attachment for the changes.
Please let us know if you need any further assistance.
Regards,
Imman Kumar P
After updating the file by following your image
It takes 10s to cold load.
https://drive.google.com/file/d/14xT6qPk4BGxMvhDakL2Omn1LOcGHDNBh/view?usp=sharing
Unfortunatelly it still longer than your 5s,
but your version cannot create the AppPackage of Arm, mine can.
Wheres the difference?
Hi Shompinice,
As you are using ARM configuration to create AppPackages, we suspect that you are using a device with ARM processor. Can you confirm the device which you have used to measure the cold start time and to deploy the ARM package?
We are able to create ARM AppPackages with the sample we have provided. As the old AppPackages were removed from the AppPackages folder, we need to clear the text files in the BundleArtifacts folder to build new one. Please find the attached video and can you confirm with us that you are following the same procedure to create ARM AppPackages?
We achieved 5 seconds cold start in a desktop device with Release and x64 configuration.
Regards,
Imman Kumar P
no i didnt have arm devices
1>MakeAppx : error : Error info: ??????
1>MakeAppx : error : Bundle creation failed.
1>MakeAppx : error : 0x80080215 - ????????????????? appx ????
Hi Shompinice,
We were unable to reproduce the issue, as we are able to create ARM AppPackages. The provided error details are not sufficient to replicate the issue.
Kindly share the following details to analyze this issue more and assist you with a better solution .
1. The procedure followed to measure the cold start time.
2. The device and configuration of the device used to determine the cold start time.
3. Error logs generated while building the AppPackage.
Regards,
Imman Kumar P