Ideas on how to optimize Ionic 3 App on Older Devices - ionic-framework

I'm looking for ideas on how to optimize an ionic 3 app on older devices. We are using devices with the Specs below.
CPU 1.7 GHz dual core processor
Operating System Android 5.1 (Lollipop) with Mobility Extensions (Mx)
for a true enterprise-class OS
Memory 1 GB RAM / 8 GB Flash pSLC
The App we developed runs great in browser (obviously a lot more horsepower). The service calls are all optimized and quick but when we use the devices it seems like buttons clicks, screen transitions, etc are all slow and laggy. In general it seems like the app is very unresponsive/slow.
One thing we have done is install Crosswalk but the laggy/slowness still exists.
Any ideas on other things to do/try to help performance of an ionic 3 app on an older device?

There is many thing You can do
run application -prod flag
optimize your css
enable Angular enableProdMode()
install progurd npm i cordova-plugin-proguard
Enable Lazy Loading
Read this good Article also
https://www.protectator.ch/post/optimizing-performance-of-an-ionic-3-application

Related

Other program get lag after running android emulator

I have a laptop with core i3 processors, 4gb RAM, and Intel HD Graphic VGA. When I tried to launch the emulator it was fine and the other program not lag. But after I run some apps in emulator the other program become lag for example chrome browser lag after some apps opened on emulator. I already tried memu, nox, and mumu emulator but all of that is the same make other program lag. Please anybody who have best solution could help me ? Thank you.
There are many different emulators out there. Now there are 3 ways to approach this problem
You can try to change the setting in emulators like NOX to make them more efficient.
You may be only able to run the emulator and a browser for the specs you are running.
You can look at other emulators that i have used on my Macbook Air early 2015 edition. These could range from Bluestacks 4 which is highly well performing emulator even on potato PC's and can be optimized to your liking. Also the KO player is a good idea if you are looking at a more gaming based alternative

Why is Android virtual device too slow?

I just downloaded adt-bundle from the android developper's site to give it a try. problems begun when i hited the "run" button: The Android virtual device or "avd" is horribly slow. I have a pretty decent machine (core i7 & 16go of ram). Aren't they aware of that? i mean it has been several years that people develop for android, how did they manage to do that?
Iphone apps running on the iphone emulator are compiled for the native processor on the mac, and those only simulate the iphone not the actual processor.
The normal android emulator also simulates the processor of the phone which makes it quite slow in comparison.
You could try out the x86 emulator that runs natively on your PC' x86 CPU instead of emulating the CPU on the phone. That a look here.

System Requirements for a Mac to Develop in MonoTouch and XCode

I want to develop C# and .NET based iPhone applications in MonoTouch. But my goal is to develop iPhone applications so things may end up with Objective-C -so Xcode- too.
Obviously, I have to buy a Mac. I've been lookin' for sales and found a couple of good machines but I still want to make sure that I can use these 2 programs in good performance.
So I want to know that if anyone uses these programs could advice me some system requirements? For example, does the CPU matters? Should I buy an iMac with Intel CPU our is G4-G5 better? And what about the VGA and RAM? Is 1GB or 2GB enough for ram and 256+ for VGA?
Of course better properties mean better performances but what's the minimum for this? We can talk on iMac.
Read this thread from the monotouch mailing-list. It's about laptop initially but it will give you the specs people are using and recommending.
(It's Mac not MAC).
It'll have to be an Intel one for any iOS development. I'm relatively happy still on a mid 2009 MacBook Pro with 4GB of RAM. To develop with the iOS 5 SDK you'll need at least Snow Leopard - so any Mac capable of running that will be a minimum.

Can I test if website works well on iPhone/iPad/etc. without iPhone?

For various varieties of Windows and IEs virtual machines work perfectly. But how do I test against iPhones?
It's not iPhone-specific site, I just don't want it to be too broken.
If you had a Mac you could install the iPhone SDK and use the iPhone Simulator.
Generally you should be ok by testing using Safari as that is the web browser that is available on both iPhone and iPad.
However, keep in mind the different amount of screen real estate for the iPhone and the reduced CPU power in both cases. These are not devices optimized to beat your quad-core Xeon base system but to reduce power consumption.
By testing against Safari (e.g. via Selenium RC and/or WebDriver) you can run a lot of tests without the device.
As a final confirmation before release I suggest to still borrow each of the target devices and run a test on it. Nothing beats the actual environment!
Good luck!
try testiphone.com
Or install the iPhone SDK and use the iPhone Simulator if your using a Mac.
The iphone simulator doesn't have the restrictions like memory and processor.
But for web application, you could try www.testiphone.com

Why is Windows Phone 7 emulator so slow compared to, um, iPhone OS Emulator?

I don't mean to start a war between iPhone vs Windows Phone 7, nor am I against Windows Phone 7. But I've noticed on both of my computers Windows Phone 7 emulator (Beta and CTP) lags like it's running on a crappy last-decade Celeron computer.
I have 2 computers: Macbook Pro 13" (2010 Model) with 2.4GHZ Core 2 Duo, 4GB RAM and ASUS G1 with 2.0 GHz Intel Core 2 Duo, 3GB RAM with fresh install of Windows 7.
Now iPhone emulator on Mac OS X is on the other hand so much smoother, and loads faster and just has better feel to it.
So why is Windows Phone 7 emulator so slow? Is that what we should expect from the devices that will be coming out this october? I hate more than anything on the phone is laggy UX; it just gets under my skin.
It would be nice if someone with the prototype device could comment on this issue.
That is because the so called "iPhone Emulator" is a simulator (hence the real name is "iPhone Simulator"). Simulators are non-native programs re-written for that computer. Emulators are non-native programs not re-written they are emulated which takes extra effort to translate everything to display the right things etc. This is why the Windows Phone 7 Emulator is slower than the iPhone Simulator.
But, since simulators do not quite as accurately represent the device as an emulator you can get better error results since the stuff is rewritten in simulators but everything is preserved in an emulator. But, even saying that, you usually don't need to worry about that.
Boy, there's a lot of "emulators are this, simulators are that" in some of those answers and I feel more confused after reading them, especially when we get into suggestions that things are "re-written for that computer"
What you need to understand is that the iPhone Simulator is an OPERATING-SYSTEM simulator, not a DEVICE simulator.
When you build for the simulator, you are compiling for an Intel x86 CPU. You link against special libraries that are for an x86 CPU but which implement the functions that are part of the iPhone operating system (call that UIKit)
When you build for the device, you are compiling for an ARM CPU. You link against special libraries that are for an ARM CPU, again which implement the UIKit.
This means that your code runs at full "machine" speed in both environments. There is no notion of "emulating a CPU" which is presumably what the Windows Phone 7 Emulator is doing, something similiar to the MacOS Virtual PC product of years ago (that Microsoft bought from Connectix, as I recall)
The problems that Rob Napier mentions are probably related to using native headers and libraries in his build (call those AppKit). There are some APIs that Apple have let bleed into the wrong SDKs, I recall there were issues with NSTask being available in the SDK even though it wasn't on the iPhone itself, for example. I'm sure there are other problems in this space, its not ideal (though its pretty cool)
Anyway, unless Microsoft have a compiler-toolset that can target both the Phone CPU and the regular Windows PC CPU, they are stuck with emulation at the CPU level, rather than at the Operating System Level.
The only advantage that this cpu-emulation approach has, to my mind, is that you can take the exact same binary and move it between device and PC and run it on both. Apples simulator approach requires you to rebuild the binaries for each platform. Personally, even on my "bottom of the line MacMini", my build times are so small that its just not an issue to rebuild whenever I switch platform.
The Windows Phone Emulator is actually the Windows Phone 7 operating system compiled for x86 running in a virtualized environment. It uses a derivative technology from Microsoft's VirtualPC/VirtualServer/Hyper-V. Thus it is really neither emulation (there is no ARM to x86 emulation going on) nor pure simulation.
The typical Windows Phone 7 device will be running an ARM processor at close to 1GHz. Emulating (as in CPU emulation) of an ARM processor requires a very powerful x86 processor. The strategy of using visualization allows the OS to execute at native x86 speed. Applications written in managed (.NET) code are executed by the x86 based .NET runtime on the OS.
So code performance on a typical PC (~1.5 - 3GHz) should typically exceed what is found on an actual ARM based WP7 device.
However, GRAPHICS performance is a whole 'nother story. Windows Phone 7 is built from the ground up on a Direct3D stack. The core OS and all graphics all the way up to the Silverlight and XNA runtimes use Direct3D. In the Windows Phone Emulator the low-level D3D graphics are "passed through" to the host PC's D3D implementation. Many problems people see with Windows Phone Emulator performance are due to poorly performing host PC graphics adapters or drivers.
See this forum response for some troubleshooting tips.
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/c4754ebd-f688-4c33-972a-a578b9db12ff
EDIT: Addressing Jeff's comment below asserting "Anyway, unless Microsoft have a compiler-toolset that can target both the Phone CPU and the regular Windows PC CPU, they are stuck with emulation at the CPU level, rather than at the Operating System Level."
All Windows Phone 7 applications & games are .NET based, thus are CPU independent. Repeating what I said above: The Windows Phone 7 Emulator does NOT emulate at the CPU level. It is running a native x86 compiled version of the OS in a virtual machine and runs the exact same application "binary" (a .XAP file) that will run on a physical device.
You need a directx 10 graphics card to get the best performance.
The beta appears to have introduced a problem effecting some peoples systems whereby GPU acceleration is not working in the emulator. The symptoms are slow rendering which is to be expected. I'd suggest adding your system details to the thread while the issue is being looked into for the best chance at a resolution on your system.
I think we need to clarify the meaning of this question to glean any type of meaningful answer from it. At the moment we could all very well be talking about different types of performance observations which potentially reduces this to more of a religous debate. I've added a comment to this effect, but you have to click "more" to see it.
The official MS document on this subject provides the reason for the slowness.
"Windows Phone Emulator is designed to provide comparable performance to an actual device "
http://msdn.microsoft.com/en-us/library/ff402563(v=VS.92).aspx