Mobile devices are in widespread use and provide an ever-increasing level of functionality. However, mobile devices, in comparison to desktop computers and other non-mobile devices, generally utilize less hardware and run at lower power levels than non-mobile devices. This not only facilitates the miniaturization of the mobile device, but also helps extend battery life.
One of the main limitations of mobile devices is memory. While mobile devices, such as smart phones and tablets, are available with tens of gigabytes of storage, the operating memory of such devices is much smaller. Further, users of mobile devices will often have more than one application running on the mobile device at the same time. Further still, each application running on the mobile device may perform an action or enter a state where the application may consume, even if momentarily, a disproportionate amount of available system operating memory. This can impact the user's experience not only for the application consuming the disproportionate amount of system memory, but also for other applications operating on the mobile device.
The discussion above is merely provided for general background information and is not intended to be used as an aid in determining the scope of the claimed subject matter.
A mobile device includes a processor and computer-readable memory having instructions stored thereon that, when executed by the processor, provide an application. The application obtains and stores snapshot information regarding consumption of the computer-readable memory of the mobile device, upon the occurrence of one or more predefined conditions.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. The claimed subject matter is not limited to implementations that solve any or all disadvantages noted in the background.
Mobile applications sometimes have complex needs with respect to communication and hardware resources. In particular, hybrid mobile applications, such as those that obtain information from a plurality of information sources, can have complex needs of integrating with external content and service providers. External or custom content can potentially affect application performance and reliability depending upon external content and specific device-type capabilities. Embodiments described herein generally provide application design and execution features that provide memory consumption details automatically and/or on demand in an application lifecycle. An application lifecycle, as defined herein, extends from the moment in time at which the application is first initiated for execution on a mobile device until the application is closed on the mobile device. During the application lifecycle, many application events, such as form loads, loading one or more resources and/or navigating to one or more resources may occur. In a hybrid application (such as a mashup) predefined checkpoints can be provided that, when encountered during application execution, will cause the application to obtain mobile device memory utilization information. As used herein, a mashup is a single application that uses content from a plurality of sources to create a single view in a graphical interface. Checkpoints include, for example, before loading starts, after loading is complete, navigating away from a resource, et cetera. Additionally, embodiments described herein also provide the capability to a user to selectively load content on demand and observe memory consumption in response to the selected load operation or actual interaction with mashups. Further, at least some mobile operating system platforms may issue warnings and error messages for low memory conditions. These warnings can be captured or otherwise used to invoke a memory snapshot or mashup disabling for further analysis.
In order to identify situations in which the memory of the device becomes constrained, and potentially affects application execution, embodiments provided herein allow a user and/or developer of an application to selectively cause the application to execute in a diagnostic mode. In such diagnostic mode, when the application encounters one or more predefined checkpoints during operation, such checkpoint(s) will trigger acquisition of snapshot information relative to memory of the mobile device. This snapshot information can be provided to the user or developer to view current memory usage, potentially broken down to various pages of memory or any other suitable level of granularity.
The selection of the diagnostic mode of the application can be done in any suitable manner. For example, the application can simply be invoked using any appropriate command line switch to cause the application to execute in such diagnostic mode. Additionally, the application can be configured by the developer to respond to a particular user input or code to switch to a diagnostic mode at any suitable time during application execution.
Computer readable medium 144 can be any suitable type of computer readable medium that is able to persistently store data. Additionally, at least some of computer readable medium 144 may also include volatile computer readable medium such as random access memory (RAM). Further, processor 140 may have its own operating memory in order to execute one or more applications 148. Operating system 146 can be any suitable mobile operating system that is now known or later developed. Operating system 146, in one example, includes an application programming interface 150 that allows applications executing on mobile device 102 to obtain memory usage information. Such memory usage information can be any suitable information regarding the utilization of any memory within the mobile device. Accordingly, memory usage information includes the utilization of non-volatile system memory, the utilization of volatile operating system memory, the error rate detected with respect to either type of memory, or any other suitable parameters.
As illustrated in
In accordance with embodiments described herein, application 148 executing on mobile device 102 is caused, in one way or another, to enter a diagnostic mode, in which execution of application 148 occurs until a predefined checkpoint within the application lifecycle is encountered. At such predefined checkpoint, application 148 interacts with API 150 to obtain a memory snapshot relative to memory utilization within mobile device 102. This memory snapshot is saved within data store 152 and can optionally be presented to a user or developer of application 148 via display 160. In the event that multiple memory snapshots are saved in data store 152, the visual indication provided to the user or developer of application 148 via display 160 can also include a graph or other suitable display showing memory usage referenced to the application lifecycle and/or referenced to time. Suitable checkpoints in the application lifecycle for application 148 can include, for example, obtaining a snapshot when a Form_Load operation is initiated, obtaining another memory snapshot when the Form_Load operation is complete. Still another suitable checkpoint includes obtaining a memory snapshot when a Mashup_Load operation is initiated, and still another memory snapshot when a Mashup_Load operation is completed. In this way, if any particular form or mashup consumes a disproportionate amount of system operating memory, or even a momentary spike in system operating memory consumption, such condition can be detected and a developer of application 148 can revise application 148 in order to address the problem.
Once the memory utilization snapshot is obtained, control passes to block 212 where the snapshot information is stored. As indicated at block 214, this snapshot information is preferably stored with a timestamp and/or an indication of the checkpoint that generated the snapshot. For example, if the checkpoint is a Mashup_Load operation, the stored snapshot information can indicate the memory utilization information; the Mashup_Load operation; and/or a timestamp, as appropriate. Next, at phantom box 216, the snapshot information may be optionally displayed to a user, such as a user of mobile device 102, or any other suitable party. For example, it is contemplated that the snapshot information could also be conveyed to a remote party for analysis in order to improve the application. Next, at block 218, method 200 determines whether the application lifecycle is complete. If so, control passes to block 220 where method 200 ends. If not, control returns to block 204 where method 200 waits for programmatic operation to encounter the next checkpoint or user input requesting acquisition of snapshot information.
Understanding the cause of conditions that affect application performance is very important and is made more difficult by the various modules and operations that run substantially simultaneously on a mobile device when a mashup application is executed. Providing an effective way to identify various programmatic operations that occur during an application's lifecycle via the acquisition of one or more memory snapshots allows users and/or developers to more quickly improve application performance. Further, since application performance may vary depending on the particular mobile device hardware/software platform that is executing the application, providing an expeditious way to identify causes of performance issues helps application developers port or otherwise design their applications for a variety of platforms more effectively and/or quickly.
A number of user interface displays have been discussed. They can take a wide variety of different forms and can have a wide variety of different user actuatable input mechanisms disposed thereon. For instance, the user actuatable input mechanisms can be text boxes, check boxes, icons, links, drop-down menus, search boxes, etc. They can also be actuated in a wide variety of different ways. For instance, they can be actuated using a point and click device (such as a track ball or mouse). They can be actuated using hardware buttons, switches, a joystick or keyboard, thumb switches or thumb pads, etc. They can also be actuated using a virtual keyboard or other virtual actuators. In addition, where the screen on which they are displayed is a touch sensitive screen, they can be actuated using touch gestures. Also, where the device that displays them has speech recognition components, they can be actuated using speech commands.
Also, the figures show a number of blocks with functionality ascribed to each block. It will be noted that fewer blocks can be used so the functionality is performed by fewer components. Also, more blocks can be used with the functionality distributed among more components.
Under other embodiments, applications or systems are received on a removable Secure Digital (SD) card that is connected to a SD card interface 15. SD card interface 15 and communication links 13 communicate with a processor 17 along a bus 19 that is also connected to memory 21 and input/output (I/O) components 23, as well as clock 25 and location system 27.
I/O components 23, in one embodiment, are provided to facilitate input and output operations. I/O components 23 for various embodiments of the device 16 can include input components such as buttons, touch sensors, multi-touch sensors, optical or video sensors, voice sensors, touch screens, proximity sensors, microphones, tilt sensors, and gravity switches and output components such as a display device, a speaker, and or a printer port. Other I/O components 23 can be used as well.
Clock 25 illustratively comprises a real time clock component that outputs a time and date. It can also, illustratively, provide timing functions for processor 17.
Location system 27 illustratively includes a component that outputs a current geographical location of device 16. This can include, for instance, a global positioning system (GPS) receiver, a LORAN system, a dead reckoning system, a cellular triangulation system, or other positioning system. It can also include, for example, mapping software or navigation software that generates desired maps, navigation routes and other geographic functions.
Memory 21 stores operating system 29, network settings 31, applications 33, application configuration settings 35, data store 37, communication drivers 39, and communication configuration settings 41. Memory 21 can include all types of tangible volatile and non-volatile computer-readable memory devices. Memory 21 stores computer readable instructions that, when executed by processor 17, cause the processor to perform computer-implemented steps or functions according to the instructions. Application 148 (shown in
Examples of the network settings 31 include things such as proxy information, Internet connection information, and mappings. Application configuration settings 35 include settings that tailor the application for a specific enterprise or user. Communication configuration settings 41 provide parameters for communicating with other computers and include items such as GPRS parameters, SMS parameters, connection user names and passwords.
Applications 33 can be applications that have previously been stored on the device 16 or applications that are installed during use, although these can be part of operating system 29, or hosted external to device 16, as well.
The mobile device of
Note that other forms of the devices 16 are possible.
Alternatively, or in addition, the functionality described herein can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), et cetera.
It should also be noted that the different embodiments described herein can be combined in different ways. That is, parts of one or more embodiments can be combined with parts of one or more other embodiments. All of this is contemplated herein.
Example 1 is a mobile device that includes a processor and computer-readable memory having instructions stored thereon that, when executed by the processor, provide an application. The application obtains and stores snapshot information regarding consumption of the computer-readable memory of the mobile device, upon the occurrence of one or more predefined conditions.
Example 2 is the mobile device of any or all previous examples wherein the one or more predefined conditions includes a predefined checkpoint in the application.
Example 3 is the mobile device of any or all previous examples wherein the predefined checkpoint is a form loading operation.
Example 4 is the mobile device of any or all previous examples wherein the predefined checkpoint is a resource loading operation.
Example 5 is the mobile device of any or all previous examples wherein the predefined checkpoint includes navigation away from a resource.
Example 6 is the mobile device of any or all previous examples wherein the application is a hybrid application.
Example 7 is the mobile device of any or all previous examples wherein the application is a mashup application operably coupled to a plurality of data sources external to the mobile device.
Example 8 is the mobile device of any or all previous examples wherein the application is configured to authenticate with at least one data source.
Example 9 is the mobile device of any or all previous examples wherein the application is configured to communicate using encryption.
Example 10 is the mobile device of any or all previous examples wherein the application includes a diagnostic mode where snapshot information is obtained and stored upon the occurrence of one or more predefined conditions and another mode in which snapshot information is not obtained upon the occurrence of one or more predefined conditions.
Example 11 is the mobile device of any or all previous examples wherein selection of the diagnostic mode is provided by the application in response to a predefined user input during application execution.
Example 12 is the mobile device of any or all previous examples wherein selection of the diagnostic mode is provided by a command line switch.
Example 13 is the mobile device of any or all previous examples wherein the one or more predefined conditions includes the occurrence of an operating system message.
Example 14 is the mobile device of any or all previous examples wherein the operating system message includes a low memory warning.
Example 15 is the mobile device of any or all previous examples wherein the mobile device is configured to provide the snapshot information to a developer.
Example 16 is the mobile device of any or all previous examples wherein the application is configured to obtain the snapshot information using an application programming interface of the mobile device.
Example 17 is a computer-implemented method of executing an application on a mobile device. The computer-implemented method includes receiving a mode selection signal and detecting a predefined checkpoint during execution of the application. Snapshot information is obtained relative to memory consumption associated with the application. The snapshot information is stored on a mobile device.
Example 18 is the computer-implemented method of any or all previous examples wherein the snapshot information is broken down to individual pages of memory.
Example 19 is the computer-implemented method of any or all previous examples wherein the snapshot information is displayed graphically on the mobile device.
Example 20 is a mobile device that includes a display, a processor, and a network interface coupled to the processor and configured to communicate with a plurality of data sources. The mobile device also includes computer-readable memory having instructions stored therein that, when executed by the processor, provide an application that displays information on the display relative to the plurality of data sources. The application includes at least one predefined checkpoint that, when reached during programmatic execution, causes the processor to obtain and store snapshot information regarding consumption of the computer-readable memory of the mobile device.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
The present application is based on and claims the benefit of U.S. provisional patent application Ser. No. 62/131,512, filed Mar. 11, 2015, the content of which is hereby incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
62131512 | Mar 2015 | US |