Log in or register to post comments

Image Target Loading Times IL2CPP Andriod

February 5, 2020 - 10:36pm #1

Hi,

We have build an APP that is nearing deployment that was building using Unity. Based on the new Google Play  store guidelines we had to switch from Mono to IL2CPP to all us to make 64-bit builds for Android. In doing so we have noticed heavy drop in performance during the loading process of Image Targets when a scene loads.

We have about 500 Image Targets, while running the build in Mono the average loading time is about 4-5 seconds, but on doing the same with IL2CPP the loading times jumps 5 times to more than 20 seconds. While checking the application in logcat, we noticed that during the 'loading' time of 20 seconds we are seeing log messages of Image Targets being loaded. Once all loaded the App becomes responsive again.

We are at the release stage and have not much understanding of why this change is performance between build targets. Considering the strict release deadlines we are in, any help on this would be greatly appreciated.

 

 

Tech Parameters.

Unity 2018.3.8f1

Vuforia 8.1.10

Image Target Loading Times IL2CPP Andriod

April 12, 2020 - 2:54am #20

Apologies for not replying quicker.

After a few combination of try outs following has been my observation. I have not got enough time to validate it in detail but has allowed me to move ahead with my deployment.

 

I don't know if this was the correct way of solving the problem or not. But I changed the package name to get problem fixed.

Initially my package name was com.company.product.variation which I changed back to com.company.productvariation. Can't be sure but if the extra '.' may be cause the OBB file to not read correctly during the loading process ?

This allowed me to test the OBB routine locally as well as worked correctly when uploaded to store for Beta testing.

 

Thanks for All the Help

Image Target Loading Times IL2CPP Andriod

March 16, 2020 - 3:21am #19

Hi,

The first reported issue regarding ILCPP x64 almost doubling the load time of big IT, in comparison to Mono,  has been fixed in the new upcoming release. 

Thank you.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

March 9, 2020 - 3:07am #18

Hi,

Please provide the mentioned test project with core samples for testing.

Thank you.

Vuforia Engine Support

 

Edit: I followed the steps described in the article: https://developer.vuforia.com/forum/faq/load-dataset-android-split-binary-obb and as per the logs from Unity, first the file the files are being generated and I need to "manually" start the Vuforia init process. I will further test the behavior.

Image Target Loading Times IL2CPP Andriod

March 7, 2020 - 1:41am #17

Hi mcotora,

I felt may be there could be something not properly setup in my project so decided to do the same test in new project with Vuforia Core Samples project.

I used the Unity 2018.3.8f1 with Vuforia 8.1.10.

I did the following to do the OBB file loading test.

1. Created a new Empty Scene with nothing but a Image Element. Created a script from LINK and changed the scene to load to '3-ImageTargets'.

2. I saved this scene and in build settings put it at 0th element; I removed other scenes from but '3-ImageTargets' from the build settings after that.

3. In Player settings I changed to IL2CPP and enabled 'Split Application Binary' to allow OBB to be generated.

4. I made a build. And followed the LINK to install the APK and OBB.

 

On Starting this APP, it gave the Developer Agreement Error. I have attached the logcat file for the same. 

 

I am not sure how to move ahead from here, since the APP works correctly if I make single APK without OBB, but when build with OBB there is no standard process that one needs to follow based on requirements of  Google Play Store and how Vuforia executes in those scenario.

Our release is getting delayed due to lack of clear process that a developer can follow to make sure tools/APIs they choose work as expected.

 

If you require the entire Unity Project to check at your end please do let me know I can share that.

AttachmentSize
Plain text icon vuforia_log.txt4.7 KB

Image Target Loading Times IL2CPP Andriod

March 6, 2020 - 11:41am #16

Hi mcotora,

Let me list out the steps that I am taking and if you can validate If I am doing it right it might help.

1. The very first scene I load is an empty scene that has just one image in it and a script that loads the XML/DAT file from the OBB file.

2. Once the loading is finished, I load into the first scene that loads the dataset. This is where all the AR stuff is.

3. I have enabled Delayed Initialization in the configuration to make sure Vuforia doesnot get loaded before I want. And only initilize it once I have finished the XML/DAT files.

But currently it is giving me the same error.

 

I have attached the log file for you to see.

 

Please do suggest any errors in my approach.

 

AttachmentSize
Plain text icon log.txt3.7 KB

Image Target Loading Times IL2CPP Andriod

March 4, 2020 - 6:26am #15

Hi,

In regards to the other issue with ILCPP ARM64, I believe we identified the culprit. It seems that Unity has some problems with ARM64 and logging of Debug.Log messages.

Please try the workaround from: https://forum.unity.com/threads/huge-fps-drops-from-60fps-armv7-to-25-30-fps-arm64-unity-2017-4-20.682018/#post-5013077

Thank you.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

March 4, 2020 - 1:32am #14

Hi,

The code example is quite old BUT seems to be fine.

If you are following the steps recommended in your link but you are still seeing this error. We would need to debug and check following:

1. Is the OBB scene clean from any Vuforia asociated GameObjects/ TrackingBehaviour

2. Debug the OBB load process, starting and complete loading of it.

Afterwards provide a logcat dump since the app has started, in which we should see that the OBB file has been loaded completely and only afterwards Vuforia is being initialized.

Thank you.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

March 3, 2020 - 10:08pm #13

Hi mcotora,

I am loading OBB file in an empty scene before any of the AR scenes are loaded as suggested in THIS LINK. Can you a bit more detailed in steps that I need to do make sure I do as you are recommending.

 

Thanks,

Krishna.

Image Target Loading Times IL2CPP Andriod

March 3, 2020 - 4:52am #12

Hi,

I've checked the eulaAcceptedVersions: '{"Values":["7.1","7.5","8.0","8.1"]}' and it includes 8.1. 

Moving forward it seems that the issue occurs as Vuforia is initialized before the OBB is loaded. With 8.6 you will get a warning regarding this and our advise would be to first load the OBB file and only afterwards initialize Vuforia.

Thank you.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

March 3, 2020 - 4:07am #11

Hi mcotora

Attaching config file as requested. Do let us know how to proceed, we are at the final deployment stage. A quick turn around would be greatly appreciated.

AttachmentSize
Plain text icon VuforiaConfiguration.asset_.txt1.89 KB

Image Target Loading Times IL2CPP Andriod

March 3, 2020 - 3:05am #10

Hi,

Please dm me a download link with the asset file or open the file with a text editor delete the License info and upload it here.

Thank you for your understanding.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

March 2, 2020 - 9:51pm #9

Hi mcotora,

 

Can you provide me with a Email that I can send it to, since it contains the Basic license that I have bought.

 

Also, please do provide feedback on the previous asked query of if there being a way to get and show progress of image targets getting loaded during the first time.

 

Thanks,

Krishna.

Image Target Loading Times IL2CPP Andriod

February 28, 2020 - 1:12am #8

Hi,

Could you please send me VuforiaConfiguration.asset file?

Thank you.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

February 27, 2020 - 9:45pm #7

Thanks for the feedback. 

I am not sure if we can wait that long for a release.

Would there be a way to check the progress of image targets that are being loaded so that at least I can show progression in loading of data ?

 

Also, I have put the APP in Play Store for some internal testing, as soon as the App is loading I get the following error. Can you please help me understand how to get rid of it?

02-28 11:04:17.898: E/Unity(28549): The Vuforia Developer Agreement needs to be accepted before using Vuforia in an application.

 

Thanks,

Krishna.

 

Image Target Loading Times IL2CPP Andriod

February 26, 2020 - 4:44am #6

Hi,

R&D is still looking into this issue, I do not know if this will be fixed in the our next release, Vuforia 9, planned for mid March.

Thank you for your understanding.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

February 21, 2020 - 11:45pm #5

Hi @mcotora

Do we have any kind of update on this ?

 

Thanks,

Krishna.

Image Target Loading Times IL2CPP Andriod

February 9, 2020 - 10:58pm #4

Hi mcotora,

 

Thanks for acknowledging the issue that we have highlighted. Hope there is a technical solution identified for it soon.

It would not be feasible for us to partially load the targets as any of the potential image targets could be required during single session. However one optimization we are planning is to only load the entire image targets only once and not during each scene load like currently we are doing.

We have been using the following devices for internal testing during development,

  • Pixel 2 XL -             Android 10
  • Galaxy A30 -           Android 9
  • Redmi Note 6 pro - Android 8.1
  • Oppo A71K -           Android 7.1
  • MI Pocco -              Android 9
  • Samsung M40 -      Android 9
  • Redmi Note 5 Pro - Android 8.1
  • MI A1 -                    Android 9

 

 

Please do let me know if any information is required,

Thanks.

Image Target Loading Times IL2CPP Andriod

February 7, 2020 - 1:55am #3

Hi,

I *was* able to reproduce the issue with 8.6.7 and reported it to the dev team.

A possible solution for your setup is to split up the db in several smaller and dynamically activated them as needed. Dynamic loading and unloading of device databases can be utilized to optimize memory usage (see DataSet APIs below). This technique can also help with CPU utilization during detection and tracking as Vuforia will require additional processing when attempting to detect large numbers of Image Targets in each camera frame. This is especially true for target detection, which is more CPU intensive than tracking.

Here are pointers to the DataSet APIs:

https://library.vuforia.com/content/vuforia-library/en/reference/cpp/classVuforia_1_1DataSet.html

https://library.vuforia.com/content/vuforia-library/en/reference/java/classcom_1_1vuforia_1_1DataSet.html

https://library.vuforia.com/content/vuforia-library/en/reference/unity/classVuforia_1_1DataSet.html

Thank you.

Vuforia Engine Support

Image Target Loading Times IL2CPP Andriod

February 6, 2020 - 8:56am #2

Hi,

The behavior is, you start the app and then it freezes for 15-20 seconds until the DataSets are loaded. afterwards the app is responsive, is my understanding correct?

Currently I am not aware of any performance issues with IL2CPP, however I will test your setup and come back, tomorrow with an update.

Could you please confirm Device model and OS running on it?

Thank you.

Vuforia Engine Support

 

Log in or register to post comments