Why does scripting backend slow down android app? - c#

I am trying to make an Android app in Unity that uses some heavy computation, when I tried to publish it to the google developer console I got an error "This release is not compliant with the Google Play 64-bit requirement"
After some digging around I found that I need to change the Scripting Backend to IL2CPP Instead of Mono and un-select x86
Now Google lets me publish the app, but when I build and run it on my phone it is significantly slower, should I be worried about this? If so is there any way to fix this? (when I change Scripting Backend back to Mono and build and run the app doesn't lag any more when it's running, perhaps there are some different settings that I need to use?)
What I read so far was that the Scripting Backend IL2CPP is supposed to be faster as far as when the app is run, but at least on my phone this doesn't seem to be the case
The phone I'm using to test this is a ZTE Blade, Model number Z965 (I think it's called ZTE Blade X but I'm not sure)in case that's useful

I (might have) found the reason for the lag from this post:
https://forum.unity.com/threads/huge-fps-drops-from-60fps-armv7-to-25-30-fps-arm64-unity-2017-4-20.682018/
It seems that any logging operations take a long time using the ARM64 architecture(I ran the app using the ARMv7 and ARM64 architecture and the ARMv7 didn't lag that much) now that I changed every logging setting to "none" the app seems to run more smoothly(anyway at least I hope that was the only problem)

Related

xamarin uwp speed up the building & deployment process

I am trying to make some change and deploy on windows 10 (UWP) but it takes too much time. Is there any option to make it faster ?
I see by using options I could increase the speed of deployment in Android and iOS.
But I couldn't find any such options for UWP.
Help please
Disable "Compile with .NET Native tool chain". It takes a lot of time to compile using .NET Native tool chain so you'd better enable it only when you are ready to ship the app to customers (don't forget to retest after that).

Can react native apps be displayed in a browser

I have a windows c# application for which I have previously developed a web client (HTML/JS) which accesses the shared data through an oData REST service.
I am now looking to move the entire application to a single platform across all devices. This will be native to iOS and Android, but I am looking to share code as much as possible. I am not interested in hybrid apps.
The two viable options are Xamarin and React Native. Although I hate Javascript, I am leaning towards React, simply because of momentum - the xamarin team seems to be very small and there is not a lot of evidence of extensive support for the xamarin platform from within microsoft.
My concern with React is - although it seems that it will get the job done on iOS and Android, it is not clear how you can run applications on PC/Mac. I am aware there is UWP / WPF support but am unsure if this is of any quality. I expect the best solution would be to run it in a browser on non-mobile platforms.
Is this possible with React Native, and is it something you could use in production in the foreseeable future.
Microsoft ReactXP is exactly what you are looking for.
Although it is still very young (first release at 22 Apr, 2017), Nader Dabit did some really excellent works on it.
Video Tutorial Here

Android Virtual Device Loads Very Slow

I am using a remote desktop having configured Win 8.1, 3gb ram DDR2, 15gb HDD free space, latest Xamarin Studio Starter version with api 21 packages. When I try to debug a simple "Hello World" solution on studio, the manually created AVD loads too slow, even android home screen does not appear after 1 hour. What should I do to speed up the process ?
I don't know if your IDE supports it but you should really try out Genymotion, it changed my development time and testing significantly.
https://www.genymotion.com/
Considering your configuration, 1 hour is too much, try restarting first.
If not go for your Android device(physical), I debug on my mobile(you don't have to wait for your mobile to start).
You Can also go for Genymotion . Many find difficulty in genymotion setup. it is pretty simple though, follow this video If you'll understand once about VirtualBox and IP, it'll be easy for next time
I would recommend 6GB Ram and i5 processor for performance lag problem. So if it is possible, you should upgrade your machine.
Thanks for your responses. Finally I have resolved the issue by creating a low resolution Android Virtual Device (Nexus One) by Xamarin Studio.
But another problem arises, the published apk file is too large.Which steps need to be done to make it perfect ?
You should try the Xamarin Android Player. In my experience it's the fastest option over Genymotion and Android's AVD images even with Intel's HAXM installed.
https://www.xamarin.com/android-player

XNA 4.0 game doesn't do anything when ran on another PC

This issue is getting real tiresome and I've been spending atleast 2 days looking around for an answer. Basically, I want to publish a game, and I've hired a friend of mine to test it out before I officially release it. Whenever he runs it, reports as "nothing happends".
These conditions are met:
He has installed the .NET Framework 4.0 and the XNA Redistributable 4.0 (he most likely also has installed other .NET Frameworks and XNA Frameworks as well, because nothing worked).
The game is compiled onto a Release build.
GamerService referenced is removed.
A possible issue could be that he's using Win8, but as my searching experience goes, XNA DEVELOPMENT is only restricted on Windows 8, right?
So, what's going on? I'm clueless.. I even put a MessageBox.Show(); after the execution of my game in my Program.cs file via try/catch, and no results.
Are there any extreme conditions in my code that I need to meet?
Any site describing 100% of all requirements to run an XNA game and the most proper way to build it?
Any issues when using non-distributable "developer tools" in XNA coding? If so, what includes in these "developer tools", and what do I need to modify? (I noticed that on another thread).
An answer to this issue would more than make my day...
Ah, and also, I tried running it on a virtual machine ( Windows 7 ) but then it spat out a messagebox saying Index outside the bounds of the array on a perfectly valid code execution, and various other random errors such as missing files when they clearly are there.
Thank you greatly!
In summary I think your app wont run on Windows 8, let me explain:
Windows 8
A possible issue could be that he's using Win8, but as my searching experience goes, XNA DEVELOPMENT is only restricted on Windows 8, right?
Officially, desktop games using unmodified Microsoft XNA 4/is not supported on Windows 8 in any form:
Microsoft officials have said the XNA tools/runtime environment used primarily by game developers isn't supported on Windows 8. - Read more...
Redistributables
Any issues when using non-distributable "developer tools" in XNA coding?
That depends on whether they are required at runtime on the target machine. That might sound like an oxymoron but in Windows c/c++, I can have an app that depends on Microsoft DLLs but we are not allowed to deploy the DLLs, one must depend on it being present in the OS; service pack or some other form. Is there something you are missing?
Windows 7
Ah, and also, I tried running it on a virtual machine ( Windows 7 ) but then it spat out a messagebox saying Index outside the bounds of the array on a perfectly valid code execution
This is more interesting and I suspect is one of the more testable aspects of your application (also that it is not Windows 8). I suggest you setup a remote-debug session to your Win7 VM or if that is not possible, use Debug.WriteLine() or equivalent displaying critical state contents.

OpenCL with Cloo: Profilers not working

I'd like to profile my application which I've written in C# using Cloo as a wrapper for OpenCL.
I've tried a few things... gDEBugger, AMD APP SDK, CodeXL, KernelAnalyzer...
Copy-Pasting my Kernel Code as it is to KernelAnalyzer will indicate that the bottleneck are the ALU operations. However, since it's only a kernel analyzer I don't wholly trust the generated information.
To properly profile my application I tried the other tools. I tried to profile with APP SDK via console using sprofile.exe but I always get "Failed to start application: 0: the process has terminated successfully". I can't really guess what the issue might be.
When using the standalone tools CodeXL and gDEBugger I can see the Debugged Process Events (Threads starting, Messages) when running the .exe but that's about it. No function calls, memory info, statistics etc... it's all empty as if I didn't run the application! So it's basically useless for me.
I don't really know what the problem might be. Could it be that using Cloo as a wrapper makes all the performed operations invisible to the profilers?
I'd appreciate any hints! Thanks in advance!
I just tried to profile Clootils.exe (the sample that comes with the Cloo distro) with CodeXL, and after some trial and error, I was able to get CodeXL to work.
I had to first rebuild both Cloo.dll and ClooUtils.exe with the Platform target set to x86. Using the default setting of "Any CPU" gave me a "The application was unable to start correctly (0xc000007b)." error. Trying "x64" gave me a "Failed to profile" error message, and left the ClooUtils.exe process in memory. But trying with "x86" allowed me to profile just fine. I tried both "GPU: Application Trace" and "GPU: Performance Counters" profile modes in CodeXL, and both worked.
So that may provide a workaround to allow using CodeXL.

Categories

Resources