The first time with android ...... Helpless contact

Source: Internet
Author: User

I really didn't think that the Emulator In the android SDK could be so slow!

Recently, I took a piece of effort to summarize a set of solutions to evaluate the Running Performance of android, from the inside out! The reason for this is that I have never worked on android. Forget it. If you can pay for it in my bank account on time, all the other things will be on the cloud. OK. Let's get started. I checked it online. Of course, I mainly studied an old report and summarized it. Three tools are needed:

1. TraceView

2. DDMS

3. OProfile

TraceView first. Based on my years of experience, once you want to create something you don't know, the number of things you want to learn will immediately expand Ry! Sure enough. To use TraceView, Emulator will be used, because I don't have a Google-developed mobile phone. With Emulator, the android virtual device will be created and sdcard will be added. After reading a lot of documents and turning around a lot of command line parameters, I suddenly found that the graphic installer of the SDK has a GUI version of AVD tool, let's talk about it in the document. What is the abbreviation of ADB? Whatever it is, it is a remote debuger, etc. If you need to start Emulator first, start Emulator. Hmm? Why does avd not exist? Look back at the document. It turns out to be the avd you just created. It should be referenced by name! It actually gave the created avd directory a globally queryable alias! I said what was the name used just now. As a developer for many years, I am so frustrated with this kind of self-defeating practices. How nice is it to directly add the ADB parent directory to the command line of Emulator, creating an alias must increase the learning cost ~. All right, everything is done, and Emulator is finally started. After waiting for a while, why don't I show an ANDROID icon and no desktop? Something wrong... open the browser, open the VPN, and prepare to continue the study documentation, the mobile desktop finally came out .....

How can this problem be so slow? My machine is also good at core 2 duo, 4G memory, desktop operations are like the old bull's liberation, slow people go crazy. Let's take a look at the materials. In this case, Google is a QEMU virtual machine of the ARM version, and a dalvikt virtual machine is running on it! Emulator is a tool used to verify application behavior. performance evaluation and so on must be left to the real machine, so you cannot learn apple and run Emulator locally?

Go out and smoke a cigarette, calm down, or write the verification program. I picked a HelloWorld from the Internet, installed Eclipse, and implemented an ADT plug-in. It's amazing that Eclipse can be directly run without compiling code! Let's take a closer look at it. It turns out that the code was compiled. I think it's right. The Java program does. I can't comment on whether this function is good or not, I personally think that when editing code, one card and one card will affect my mood and thoughts too much.

Finally, retrieve the trace file from the Emulator's sdcard file and open the TraceView tool. Hmm ~ Hmm ~ Hmm ~ Hmm? Where is the call stack diagram? There seems to be no option on the menu. Go back and check the document. I am X. This is too much. I have to install Graphiz's ancient Network Graph Generation Tool! This is really talented. Since you have all made a GUI version of the trace viewing tool, why not simply integrate the call stack Diagram Display?

From the perspective of development tools, android can only be said to be a semi-finished product. Its learning curve is too steep. In addition, I also spoke about java. 10 years ago, sun said that the CPU will become faster in the future, the memory becomes cheaper, and the execution efficiency of java is no longer a problem. In the 1 GHz era when the ARM processing chip was running, java-based Eclipse (many libraries on this interface are still Local Code) was still so slow on my Core 2 duo machine, it seems that the execution of the virtual machine code cannot reach a satisfactory level at all. Now I also understand why the bridge has never caught a cold in java. for Apple, which focuses on user experience, java runs slowly and unknown, so memory usage is soaring or intermittent jamming (as if due to GC), is really like garbage.

BTW, I think it is really necessary to prevent programmers from making mistakes at the syntax level (.. Net with too many extensions has deviated from this rule.) The GC language is available, but developers are not given control over the execution speed, it cannot provide direct local code generation for better execution efficiency, so that virtual machines can consume the computing resources and power of users' mobile phones in vain. Is that too much?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.