The embodiments below relate to control of application programs.
With the recent development of digital technology, various types of electronic devices, such as mobile communication terminals, smart phones, tablets, personal computers, personal digital assistants (PDAs), electronic diaries, notebooks, or wearable devices, have been widely used. The electronic device has evolved to a mobile convergence stage in which the electronic device encompasses functions of other devices. For example, the electronic device may provide a communication function, such as voice calls and video calls, a message transmission/reception function, such as SMS (short message service)/MMS (multimedia message service) and e-mail, an electronic diary function, a recording function, a broadcast reproducing function, a video reproducing function, a music reproducing function, an Internet function, a messenger function, a game function, a social networking service (SNS) function, and the like.
The various functions provided by the electronic device may be implemented through application programs.
The embodiments below are intended to provide a device and a method for controlling a processing speed of an application program.
In addition, the embodiments below are intended to provide a device and a method for controlling application programs to thus control power consumption.
A method for operating an electronic device, according to various embodiments, may include the steps of: executing an application program in response to an input by a user; detecting a user perception response period in an execution period of the application program; and transmitting information on the user perception response period.
An electronic device, according to various embodiments, may include: a controller; a communication unit configured to be operatively connected to the controller, and configured to transmit and receive data; and a display configured to be operatively connected to the controller, and configured to display a user interface (UI), wherein the controller is configured to: execute an application program in response to an input by a user; detect a user perception response period in an execution period of the application program; and transmit information on the user perception response period.
A device and a method, according to various embodiments, can improve the processing speed of an application program, and can reduce the power consumption of a device in which the application program is executed.
The following description will be made in detail with reference to the accompanying drawings in order to fully understand the present disclosure. A like element will bear a like reference numeral in the drawings.
Hereinafter, various embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that there is no intent to limit the present disclosure to the particular forms disclosed herein; rather, the present disclosure should be construed to cover various modifications, equivalents, and/or alternatives of embodiments of the present disclosure. In describing the drawings, similar reference numerals may be used to designate similar constituent elements.
The terms used in the present disclosure are only used to describe specific embodiments, and are not intended to limit the present disclosure. A singular expression may include a plural expression unless they are definitely different in a context. Unless defined otherwise, all terms used herein, including technical and scientific terms, have the same meaning as those commonly understood by a person skilled in the art to which the present disclosure pertains. Such terms as those defined in a generally used dictionary may be interpreted to have the meanings equal to the contextual meanings in the relevant field of art, and are not to be interpreted to have ideal or excessively formal meanings unless clearly defined in the present disclosure. In some cases, even the term defined in the present disclosure should not be interpreted to exclude embodiments of the present disclosure.
An electronic device according to various embodiments of the present disclosure may include at least one of, for example, a smart phone, a tablet Personal Computer (PC), a mobile phone, a video phone, an electronic book reader (e-book reader), a desktop PC, a laptop PC, a netbook computer, a workstation, a server, a Personal Digital Assistant (PDA), a Portable Multimedia Player (PMP), a MPEG-1 audio layer-3 (MP3) player, a mobile medical device, a camera, and a wearable device. According to various embodiments, the wearable device may include at least one of an accessory type (e.g., a watch, a ring, a bracelet, an anklet, a necklace, a glasses, a contact lens, or a Head-Mounted Device (HMD)), a fabric or clothing integrated type (e.g., an electronic clothing), a body-mounted type (e.g., a skin pad, or tattoo), and a bio-implantable type (e.g., an implantable circuit).
Hereinafter, various embodiments of the present disclosure will be described based on an approach of hardware. However, various embodiments of the present disclosure include a technology that uses both hardware and software and thus, the various embodiments of the present disclosure may not exclude the perspective of software.
Referring to
Referring to
In executing a certain task (e.g., a function), the computation-centric response period 210 may be generally defined as a period from the time at which the task is started upon the reception of a necessary input to the time at which the task is explicitly completed. That is, the computation-centric response period 210 may range from the time at which a user input is applied to the time at which the task of the application program is completed. For example, if the execution of an application program brings about a chain of a plurality of tasks, the computation-centric response period 210 may be defined as a period from the input application time to the time at which all of the task chains are completed.
However, since the recent environment for using the electronic device has provided interaction through a user interface, the computation-centric response period 210 may not match a response period of the electronic device 100 that the user perceives. For example, if the last of the plurality of tasks is displaying the result on the display of the electronic device 100, the user may recognize the computation-centric response period as a perception response period 210. On the other hand, if the displaying on the display of the electronic device 100, among the plurality of tasks, is completed early, the user may recognize, as the perception response period, the time shorter than the computation-centric response period 210. Therefore, it may be required to define the operation period of the application program in terms of the user.
Referring to
In general, the recent operation scenarios of the electronic device (e.g., the electronic device 100 of
The interactive session 310 may include a user perception response period 330 and a user-oblivious response period 350.
The user perception response period 330 may be defined as a period from the time at which a user input is applied to the time at which the display of the user interface is completed. In other words, the user perception response period 330 may be a period in which a user applies an input and feedback thereto is provided. If a processing speed of the electronic device 100 is low in the user perception response period 330, the user may regard this as degradation in the performance of the electronic device 100.
The user-oblivious response period 350 may be defined as a period from the time at which the display of the user interface is completed to the time at which a next user input is applied. In other words, the user-oblivious response period 350 may be a period in which the user identifies and interprets the feedback of the electronic device 100 expressed through a user interface and then applies a next input. Even if the processing speed of the electronic device 100 is low in the user-oblivious response period 350, the user may not regard this as degradation in the performance of the electronic device 100.
Various embodiments of the present disclosure may provide a device and a method for setting the user perception response period 330 as short as possible. Furthermore, various embodiments of the present disclosure may provide a device and a method for reducing power consumption of the electronic device 100 by lowering the processing speed of the electronic device 100 in the user-oblivious response period 350.
The latest electronic device (for example, the electronic device 100 in
Referring to
The demon thread 470 may perform a function of assisting other threads. For example, the demon thread 470 may provide services in the background while an application is executed. When the main thread 410 or the like is terminated, the demon thread 470 may also be forced to terminate.
Referring to
The scenario 510 may correspond to a situation in which both the invalidation request and the updating process for the UI component occur in the main thread. The electronic device 100 may perform the updating processes (e.g., UI_update 1 and UI_update 2) for the invalidation requests (e.g., UI_invalidate 1 and UI_invalidate 2), which are accumulated in a constant cycle, at one time, instead of performing the updating process (UI_update) immediately after the occurrence of the invalidation request (e.g., UI_invalidate). The scenario 510 may have the following operation procedure. A user input may call a callback method. The called callback method may generate an invalidation process (e.g., UI_invalidate 1 and UI_invalidate 2). In response to the generation of the invalidation process, the electronic device 100 may redraw the invalidated UI component through the updating process (e.g., UI_update 1 and UI_update 2).
A device and a method, according to various embodiments, may store a start time of the called callback method and the UI invalidation requests called in the corresponding callback method, and may check whether or not the UI invalidation requests are processed at the time of updating the UI component, thereby detect the user perception response period 330.
Referring to
A device and a method, according to various embodiments, in addition to the information to be identified in the scenario 510, may identify all of the UI invalidation requests, which have occurred in the worker thread delegated a task by the main thread, and the time for processing the invalidation request (e.g., the path 550 and update 3), thereby perceiving the user perception response period 330.
With reference to
A device and a method, according to various embodiments, in addition to the information to be identified in the scenario 510, may identify all of the invalidation requests, which have occurred in the demon thread, and the time for processing the invalidation request (e.g., the paths 580, 590, and 595, update A-1, update A-2, and update A-3), thereby perceiving the user perception response period 330.
Although it is not illustrated in
Referring to
The input unit 610 may receive instructions or data from the user. The input unit 610 may transmit the instructions or data to the display 620, the communication unit 630, the memory 640, or the controller 650. Furthermore, the input unit 610 may be implemented as a touch panel. The input unit 610 may detect a touch input using a finger or a pen or a hovering input. The input unit 610 may include a sensor. The sensor may be attached independently to the touch panel of the input unit 110. The sensor may include a sensor for detecting the location or motion of the electronic device 100 (e.g., an acceleration sensor, a geomagnetic sensor, or a gyro-sensor).
The input may be executed by touching and releasing or dragging and dropping. The input unit 610 may provide the controller 650 with an input received through a touch and data on the input.
The display 620 may be a liquid crystal display (LCD) or a light emitting diode (LED) display. The display 620 may display a variety of information (e.g., multimedia data or text data) to the user. For example, the display 620 may display a graphical user interface (GUI) for interaction between the user and the electronic device 100. When the user executes an application program through the input unit 610, the display 620 may display an execution result of the application program. The user may input new information or a new instruction through the input unit 610 in response to the display of the execution result of the application program.
The input unit 610 and the display 620 may be configured as an integral touch screen.
The communication unit 630 may be equipped with a variety of communication functions (e.g., LTE, Bluetooth, NFC, or the like) for communication with the electronic device 100 and external systems. The communication unit 630 may establish communication between the electronic device 100 and external devices. For example, the communication unit 630 may be connected to a network through wireless or wired communication in order to thereby communicate with the external devices.
The communication unit 630 may transmit data, which contains path information of the application program processed by the controller 650, to a developer of the application program or the like. Moreover, the communication unit 630 may receive update data made by improving the path information of the application program by the developer of the application program or the like. The received update data may enhance the performance of the application program.
The memory 640 may refer to one or more memory groups. The memory 640 may store data and/or instructions received from or generated by other elements (e.g., the input unit 610, the display 620, the communication unit 630, or the controller 650).
In order to execute the application program, the memory 640 may include callback methods for processing user inputs, methods used for exchanging messages between the main thread and the worker thread, methods necessary for generating a new worker thread, methods for invalidation and update of the UI components, and methods corresponding to a storage I/O and a network I/O.
The controller 650 may be implemented by SoC (system on chip). Furthermore, the controller 650 may be separated into pieces, and may be configured to be combined with the internal elements (e.g., the input unit 610, the display 620, the communication unit 630, the memory 640, or the like) of the electronic device 100 as necessary.
The controller 650 may receive instructions from other elements (e.g., the input unit 610, the display 620, the communication unit 630, the memory 640, or the like), may interpret the received instructions, and may perform calculations or data processing according to the interpreted instructions.
Referring to
The path detector 710 may monitor calls and returns of all methods that are called during the execution of the application program. Furthermore, the path detector 710 may dynamically extract the factor of each target method to be monitored and a member field of the class to which the monitored target method belongs.
The path detector 710 may monitor methods used for exchanging messages in order to determine the completion time of the user perception response period, methods necessary for generating a new worker thread, and methods for invalidation and update of the UI components.
The path detector 710 may monitor the methods corresponding to the storage I/O and the network I/O in order to analyze the centric and critical path. The centric and critical path flow may refer to a path having the longest period for determining the user perception response period among a plurality of paths corresponding to the user perception response period.
The path detector 710 may detect a plurality of paths that occur during the execution of the application program based on the target methods to be monitored.
The path detector 710 may determine whether or not the current path corresponds to the user perception response period by monitoring the methods corresponding to the user perception response period (e.g., the methods used for exchanging messages, the methods necessary for generating a new worker thread, and the methods for invalidation and update of the UI components). When it is determined that the current path corresponds to the user perception response period, the path detector 710 may detect the current path. In addition, the path detector 710 may transmit, to the frequency controller 760, the information stating that the current path corresponds to the user perception response period. Furthermore, the path detector 710 may determine whether or not the current path corresponds to the user-oblivious response period. When it is determined that the current path corresponds to the user-oblivious response period, the path detector 710 may detect the current path. Moreover, the path detector 710 may transmit, to the frequency controller 760, the information stating that the current path corresponds to the user-oblivious response period.
The path detector 710 may transmit, to the outside, data including the detected path information through the communication unit 630 shown in
The frequency controller 760 may control the processing speed of the application program. The frequency controller 760 may control the frequency of the electronic device 100 or the controller 650 in order to thereby control the processing speed of the application program.
The frequency controller 760 may adjust the processing speed of the path corresponding to the user perception response period to be increased, based on the path information obtained from the path detector 710. The frequency controller 760 may calculate a frequency of the current sampling cycle of the path corresponds to the user perception response period. The frequency controller 760 may determine whether or not it is possible to increase a frequency of a next sampling cycle based on the frequency of the current sampling cycle calculated above. Whether or not it is possible to increase the frequency of the next sampling cycle may be based on the current state of the electronic device 100 (e.g., the types or the number of application programs currently running in the electronic device 100). When it is determined that it is possible to increase the frequency, the frequency controller 760 may increase the frequency of the next sampling cycle of the path corresponding to the user perception response period. On the other hand, when it is determined that it is impossible to increase the frequency, the frequency controller 760 may maintain the frequency of the next sampling period of the path corresponding to the user perception response period at the frequency of the current sampling period.
The frequency controller 760 may adjust the processing speed of the path corresponding to the user-oblivious response period to be reduced, based on the path information obtained from the path detector 710. The frequency controller 760 may calculate a frequency of the current sampling cycle of the path corresponds to the user-oblivious response period. The frequency controller 760 may determine whether or not it is possible to reduce a frequency of a next sampling cycle based on the frequency of the current sampling cycle calculated above. Whether or not it is possible to reduce the frequency of the next sampling cycle may be based on the current state of the electronic device 100 (e.g., the types or the number of application programs currently running in the electronic device 100). When it is determined that it is possible to reduce the frequency, the frequency controller 760 may reduce the frequency of the next sampling cycle of the path corresponding to the user-oblivious response period. If necessary, the frequency controller 760 may set the frequency of the next sampling cycle as a minimum frequency supported by the electronic device 100. On the other hand, when it is determined that it is impossible to reduce the frequency, the frequency controller 760 may maintain the frequency of the next sampling period of the path corresponding to the user-oblivious response period at the frequency of the current sampling period.
Referring to
Since a recent electronic device (e.g., the electronic device 100 of
The path detection framework 810 may determine a completion time of the user perception response period by monitoring callback methods for processing a user input, methods for exchanging messages between the main thread and the worker thread, methods for generating a new worker thread, and invalidation and update methods for the UI components.
The path detection framework 810 may detect a plurality of paths generated by the execution of an application program by monitoring the methods. In particular, the path detection framework 810 may detect a plurality of paths corresponding to the user perception response period including a centric and critical path.
The path detection framework 810 may transmit information on the plurality of detected paths to the transmission/reception framework 820, the frequency control framework 830, or the like. The path detection framework 810 may be included in the controller 650 shown in
The frequency control framework 830 may control the processing speed of a running application program. When an application is in operation, the frequency control framework 830 may control the processing speed of the application program based on the path information obtained from the path detection framework 810.
The frequency control framework 830 may adjust the processing speed of a path corresponding to the user perception response period to be increased. The procedure for increasing the processing speed may be performed as follows. The frequency control framework 830 may recognize a path corresponding to the user perception response period from the path detection framework 810. The frequency control framework 830 may determine whether or not it is possible to increase the frequency of the path corresponding to the user perception response period based on the information, the current state of the electronic device 100, and/or the frequency of the current sampling cycle. If it is possible to increase the frequency, the frequency control framework 830 may increase the frequency of the next sampling cycle to be higher than the frequency of the current sampling cycle. If it is impossible to increase the frequency, the frequency control framework 830 may maintain the frequency of the next sampling cycle at the frequency of the current sampling cycle.
The frequency control framework 830 may adjust the processing speed of a path corresponding to the user-oblivious response period to be reduced. The procedure for reducing the processing speed may be performed as follows. The frequency control framework 830 may recognize a path corresponding to the user-oblivious response period from the path detection framework 810. The frequency control framework 830 may determine whether or not it is possible to reduce the frequency of the path corresponding to the user-oblivious response period based on the information, the current state of the electronic device 100, and/or the frequency of the current sampling cycle. If it is possible to reduce the frequency, the frequency control framework 830 may reduce the frequency of the next sampling cycle to be lower than the frequency of the current sampling cycle. If necessary, the frequency control framework 830 may set the frequency of the path corresponding to the user-oblivious response period as a minimum frequency supported by the electronic device 100. If it is impossible to reduce the frequency, the frequency control framework 830 may maintain the frequency of the next sampling cycle at the frequency of the current sampling cycle.
The frequency control framework 830 may be included in the controller 650 shown in
The transmission/reception framework 820 may perform a function of transmitting path information to an external device (e.g., the host 840) or the like.
The transmission/reception framework 820 may receive the detected path information from the path detection framework 810.
The transmission/reception framework 820 may transmit the received path information to the host 840. In addition, the transmission/reception framework 820 may receive updated path information from the host 840. The programming language used by the electronic device 100 including the path detection framework 810, the frequency control framework 830, and the transmission/reception framework 820 may be different from the programming language used by external devices including the host 840. The transmission/reception framework 820, according to various embodiments, may control the electronic device 100 to allow communication with an electronic device using a different programming language. For example, a socket server-client model may be applied to the transmission/reception framework 820.
The transmission/reception framework 820 may be included in at least one of the communication unit 630 or the controller 650 shown in
The host 840 may receive path information from the transmission/reception framework 820 through wired or wireless communication. The host 840 may recognize a centric and critical path among the paths corresponding to the user perception response period based on the received path information. More specifically, the host 840 may establish a path corresponding to the user perception response period while inversely tracing from the thread requesting the last UI update toward the thread generating the same. When reaching the callback method through the established path, the host 840 may determine that the established path is the centric and critical path.
The host 840 may display the determined centric and critical path to a developer in the form of a graphical user interface (GUI).
The host 840 may update the determined centric and critical path. The host 840 may correct the centric and critical path through modification of the developer or the like or through a predetermined algorithm in the host 840. For example, if the centric and critical path includes operations taking a long processing time or having low relativeness to the UI (e.g., the storage I/O or the network I/O), and if it is possible to implement the operations through other paths, the host 840 may extract the operations from the centric and critical path. The excluded operations may be implemented through other paths. That is, the host 840 may generate a new centric and critical path based on the received information on the centric and critical path.
The host 840 may transmit information on the new centric and critical path to the transmission/reception framework 820. In response thereto, the transmission/reception framework 820 may update the path of the application program by providing the information to the path detection framework 810 or the like.
An electronic device, according to the various embodiments above, may include: a controller; a communication unit configured to be operatively connected to the controller, and configured to transmit and receive data; and a display configured to be operatively connected to the controller, and configured to display a user interface (UI), wherein the controller is configured to: execute an application program in response to an input by a user; detect a user perception response period in an execution period of the application program; and transmit information on the user perception response period. The execution of the application program may be comprised of a plurality of execution paths. The plurality of execution paths may include one of a first execution path associated with the display of at least one user interface screen for the application program, a second execution path supporting the first execution path, or a third execution path for processing an input received by the electronic device, or a combination thereof.
In various embodiments, the user perception response period may include a period from the time at which the application program is executed to the time at which the display of at least one user interface for the application program is completed, and the controller may be configured to further increase a processing speed of the application program in the user perception response period. The controller may be configured to: calculate a frequency of a current sampling cycle corresponding to the user perception response period; and increase a frequency of a next sampling cycle to be higher than the calculated frequency, thereby increasing the processing speed of the application program in the user perception response period.
In addition, in various embodiments, the user perception response period may include a period from the time at which the application program is executed to the time at which the display of at least one user interface for the application program is completed, and the controller may be further configured to reduce a processing speed of the application program in a user-oblivious response period from the time at which the display of at least one user interface is completed to the time at which the execution of the application program is terminated among the execution period. The controller may be configured to: calculate a frequency of a current sampling cycle corresponding to the user-oblivious response period; and reduce a frequency of a next sampling cycle to be lower than the calculated frequency of the period, thereby adjusting the processing speed of the application program to be reduced in the user-oblivious response period.
In addition, in various embodiments, the controller may be further configured to transmit first data including a plurality of paths to a second electronic device. The second electronic device may be an electronic device of a developer of the program. Furthermore, the controller may be further configured to receive second data from the second electronic device and to update the application program based on the second data, and the second data may include information to shorten the user perception response period from the execution time of the program to the time at which the updating of the display of at least one user interface for updating the application program is completed.
Referring to
In step 920, the electronic device 100 may monitor the paths generated by the running application program. The electronic device 100 may monitor at least one of a plurality of callback methods generated by the execution of the application program, a plurality of threads, or instructions and operations derived from the plurality of callback methods and threads. The electronic device 100 may determine whether the path corresponds to the user perception response period or the user-oblivious response period through the monitoring. The operation in step 920 may be performed by the controller 650 shown in
In step 930, the electronic device 100 may determine the frequency based on the type of path. If the path corresponds to the user perception response period, the electronic device 100 may adjust the frequency corresponding to the path to be increased. On the other hand, if the path corresponds to the user-oblivious response period, the electronic device 100 may adjust the frequency corresponding to the path to be reduced. That is, the electronic device 100 may determine the frequency based on the type of path, and may adjust the processing speed of each path through the determination of the frequency. The operation in step 930 may be performed by the controller 650 shown in
Referring to
In step 1020, the electronic device 100 may identify whether or not there is a worker thread. More specifically, the electronic device 100 may identify whether or not there is a worker thread associated with the callback methods. The worker thread may be an existing worker thread that has received a task due to the callback methods. In addition, the worker thread may be a newly generated worker thread due to the callback methods. A plurality of worker threads may be provided. If there is no worker thread, the electronic device 100 may perform the operation in step 1050. That is, if there is no worker thread, the electronic device 100 may perform the monitoring for the main threads. If there is a worker thread, the electronic device 100 may perform the operation in step 1030. The operation in step 1020 may be performed by the controller 650 shown in
In step 1030, the electronic device 100 may track a UI update request for each worker thread identified in step 1020. For example, the electronic device 100 may track the UI update request for the worker thread by tracing the path 550 shown in
In step 1040, the electronic device 100 may determine whether or not each monitored worker thread is terminated. If all of the monitored worker threads have not been terminated, the electronic device 100 may continue to trace the UI update request in step 1030. On the other hand, if all of the monitored worker threads have been terminated, the electronic device 100 may perform the operation in step 1050. The operation in step 1040 may be performed by the controller 650 shown in
In step 1050, the electronic device 100 may track a UI update request for the main thread. The UI update requests may include a UI update request generated in the main thread, a UI update request generated in the demon thread and flowing into the main thread, and the like. The electronic device 100 may internally manage the UI component that is the target of the UI update request in step 1030. The electronic device 100 may track each UI update request until the processing of all of the UI update requests for the corresponding user input are completed. The operation in step 1050 may be performed by the controller 650 shown in
In step 1060, the electronic device 100 may determine the completion time of the user perception response period based on the monitored information through the operations in steps 1010 to 1050. In addition, the electronic device 100 may detect the respective paths included in the application program executed by the user input based on the monitored information through the operations in steps 1010 to 1050. The operation in step 1060 may be performed by the controller 650 shown in
The respective pieces of information obtained through the operations in the steps 1010 to 1060 may be transmitted to other elements of the electronic device 100 (e.g., the communication unit 630 or the like) or to other elements in the controller (e.g., the frequency controller 760 or the like) in each step. Alternatively, the respective pieces of information obtained through the operations in steps 1010 to 1060 may be transmitted to other elements of the electronic device 100 or to other elements in the controller after all of the steps are completed.
The operations in steps 1010 to 1060 may be performed in parallel, or may be performed with a change in the sequence thereof according to the embodiments.
Referring to
‘onClick’ 1110 may be a callback method generated in response to a user input for executing the application program. In
A path 1120 may be implemented by a combination of the operation in the main thread and the operation in the worker thread. If ‘onClick’ 1110 is triggered by a user input, the main thread may delegate a task to the worker thread through ‘sendMessage’. At this time, the electronic device 100 may extract ‘msg ID’ of the ‘sendMessage’. In response to the task delegation of the main thread, the worker thread may initiate the task through ‘dispatchMessage’. At this time, the electronic device 100 may match the extracted ‘msg ID’. The worker thread may perform the delegated task to thus generate ‘invalidate 2’, and may transmit the same to the main thread. At this time, the electronic device 100 may extract an ID. The main thread may terminate the task on the path 1120 through ‘update 2’ 1160 in response to ‘invalidate 2’. At this time, the electronic device 100 may match the ID. The ‘update 2’ 1160 may indicate that the updating of the UI or the UI component corresponding to the path 1120 has been completed.
A path 1130 may be implemented by the operation in the main thread. The path 1130 may be terminated by performing ‘update 1’ in response to ‘invalidate 1’. The ‘update 1’ may indicate that the updating of the UI or the UI component corresponding to the path 1130 has been completed.
Paths 1140 and 1150 may be implemented by a combination of the operation in the main thread and the operation in the demon thread. The demon thread of the path 1140 may transfer the task for ‘invalidate A-1’ to the main thread. In addition, the demon thread of the path 1150 may transfer the task for ‘invalidate A-1’ to the main thread. The task in the path 1140 may be terminated through ‘update A-1’ of the main thread. In addition, the task in the path 1150 may be terminated through ‘update A-2’ of the main thread. The ‘invalidate A-1’ and ‘invalidate A-2’ may be generated by the information input from the outside of the electronic device 100 rather than a user input. For example, the ‘invalidate A-1’ and ‘invalidate A-2’ may be advertisements or the like received from the outside of the electronic device 100.
In
Referring to
If the display of the UI screen has not been completed (that is, if it corresponds to the user perception response period), the electronic device 100 may calculate a frequency of the current sampling cycle in step 1220. The frequency of the current sampling cycle may be calculated in order to determine whether or not the frequency of the currently executed path is appropriate. The operation in step 1220 may be omitted depending on the implementation of the electronic device 100. In addition, the operation in step 1220 may be performed in combination with the operations in other steps.
In step 1230, the electronic device 100 may determine whether or not it is possible to increase a frequency of a next sampling cycle based on the calculated frequency of the current sampling cycle and the current state of the electronic device 100. If it is impossible to increase the frequency, the electronic device 100 may maintain the frequency of the next sampling cycle at the frequency of the current sampling cycle in step 1240. On the other hand, if it is possible to increase the frequency, the electronic device 100 may increase the frequency of the next sampling cycle to be greater than the frequency of the current sampling cycle in step 1250. The operations in steps 1220 to 1250 may be performed by the controller 650 shown in
When the display of the UI screen is completed (that is, when it corresponds to the user-oblivious response period), the electronic device 100 may calculate a frequency of the current sampling cycle in step 1260. The operation in step 1260 may be omitted depending on the implementation of the electronic device 100. In addition, the operation in step 1260 may be performed in combination with the operations in other steps.
In step 1270, the electronic device 100 may determine whether or not it is possible to reduce a next sampling cycle based on the calculated frequency of the current sampling cycle and the current state of the electronic device 100. If it is impossible to reduce the frequency, the electronic device 100 may maintain the frequency of the next sampling cycle at the frequency of the current sampling cycle in step 1280. On the other hand, if it is possible to reduce the frequency, the electronic device 100 may reduce the frequency of the next sampling cycle to be lower than the frequency of the current sampling cycle in step 1290. The operations in steps 1260 to 1290 may be performed by the controller 650 shown in
The electronic device 100 may increase the frequency of the user perception response period in order to thereby increase the processing speed of the path corresponding to the user perception response period. This enables the user to perceive an increase in the processing speed of the application program (that is, the improvement of the performance of the application program). In addition, the electronic device 100 may reduce the frequency of the user-oblivious response period to thus reduce power consumption of the electronic device 100.
Referring to
The respective scenarios corresponding to the scenario IDs may perform different kinds of functions (e.g., reading an article, viewing a profile page, or the like), or may include different operations even if they perform the same function (e.g., launching).
Referring to
As shown in the graph 1360, the electronic device, according to various embodiments, may reduce power consumption by reducing the frequency in the user-oblivious response period. The reduction in the power consumption may increase as the user-oblivious response period becomes longer.
Referring to
The right vertical axis of the graph in
Referring to
In step 1520, the electronic device 100 may monitor the paths generated by the execution of the application program. The electronic device 100 may detect the completion time of the user perception response period through the monitoring as in the operation of step 920 in
In step 1530, the electronic device 100 may transmit data including information on the paths to the host 840. The operation in step 1530 may be performed by at least one of the communication unit 610 or the controller 650 shown in
In step 1540, the host 840 may update the execution path of the application program based on the path information included in the received data. For example, the host 840 may receive a plurality of paths for the application program. The host 840 may select paths corresponding to the user perception response period from among the plurality of received paths. The host 840 may select a centric and critical path from among the selected paths corresponding to the user perception response period. The host 840 may analyze the selected centric and critical path. More specifically, the host 840 may identify operations that may switch to a background or another path among the operations included in the centric and critical path. The host 840 may generate data that allows the application program of the electronic device 100 to be updated with identified operations.
In step 1550, the host 840 may transmit the update data to the electronic device 100. In response thereto, the electronic device 100 may receive the update data. The operation in step 1550 may be performed by at least one of the communication unit 610 or the controller 650 shown in
In step 1560, the electronic device 100 may update the application program by applying the update data. The operation in step 1560 may be performed by the controller 650 shown in
The electronic device 100 may improve the performance of the application program through the operations in steps 1510 to 1560. More specifically, the electronic device 100 may shorten the execution time of the application program corresponding to the user perception response period.
Referring to
In step 1620, the electronic device 100 may monitor the paths generated by the execution of the application program. The operation in step 1620 may correspond to the operation in step 920 of
In step 1630, the electronic device 100 may transmit data including the information on the monitored paths to the host 840 shown in
Referring to
An operating method of an electronic device, according to the various embodiments above, may include the steps of: executing an application program in response to an input by a user; detecting a user perception response period in an execution period of the application program; and transmitting information on the user perception response period. The execution of the application program may be comprised of a plurality of execution paths. The plurality of execution paths may include one of a first execution path associated with the display of at least one user interface screen for the application program, a second execution path supporting the first execution path, or a third execution path for processing an input received by the electronic device, or a combination thereof.
In various embodiments, the user perception response period may include a period from the time at which the application program is executed to the time at which the display of at least one user interface for the application program is completed, and the method may further include a step of increasing a processing speed of the application program in the user perception response period. The step of increasing the processing speed of the application program in the user perception response period may include the steps of: calculating a frequency of a current sampling cycle corresponding to the user perception response period; and increasing a frequency of a next sampling cycle to be higher than the calculated frequency, thereby increasing the processing speed of the application program in the user perception response period.
In various embodiments, the user perception response period may include a period from the time at which the application program is executed to the time at which the display of at least one user interface for the application program is completed, and the method may further include a step of reducing a processing speed of the application program in a user-oblivious response period from the time at which the display of at least one user interface is completed to the time at which the execution of the application program is terminated, among the execution period. The step of reducing the processing speed of the application program in the user-oblivious response period may include the steps of: calculating a frequency of a current sampling cycle corresponding to the user-oblivious response period; and reducing a frequency of a next sampling cycle to be lower than the calculated frequency of the period, thereby adjusting the processing speed of the application program to be reduced in the user-oblivious response period.
In various embodiments, the method may further include the step of transmitting first data including a plurality of paths to a second electronic device. The second electronic device may be an electronic device of a developer of the program. Furthermore, the method may further include the steps of: receiving second data from the second electronic device; and updating the application program based on the second data, and the second data may include information to shorten the user perception response period from the execution time of the program to the time at which the updating of the display of at least one user interface for updating the application program is completed.
Methods stated in claims and/or specifications according to various embodiments may be implemented by hardware, software, or a combination of hardware and software.
When the methods are implemented by software, a computer-readable storage medium for storing one or more programs (software modules) may be provided. The one or more programs stored in the computer-readable storage medium may be configured for execution by one or more processors within the electronic device. The at least one program may include instructions that cause the electronic device to perform the methods according to various embodiments of the present disclosure as defined by the appended claims and/or disclosed herein.
The programs (software modules or software) may be stored in non-volatile memories including a random access memory and a flash memory, a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic disc storage device, a Compact Disc-ROM (CD-ROM), Digital Versatile Discs (DVDs), or other type optical storage devices, or a magnetic cassette. Alternatively, any combination of some or all of the may form a memory in which the program is stored. Further, a plurality of such memories may be included in the electronic device.
In addition, the programs may be stored in an attachable storage device which may access the electronic device through communication networks such as the Internet, Intranet, Local Area Network (LAN), Wide LAN (WLAN), and Storage Area Network (SAN) or a combination thereof. Such a storage device may access the electronic device via an external port. Further, a separate storage device on the communication network may access a portable electronic device.
In the above-described detailed embodiments of the present disclosure, a component included in the present disclosure is expressed in the singular or the plural according to a presented detailed embodiment. However, the singular form or plural form is selected for convenience of description suitable for the presented situation, and various embodiments of the present disclosure are not limited to a single element or multiple elements thereof. Further, either multiple elements expressed in the description may be configured into a single element or a single element in the description may be configured into multiple elements.
Although the embodiment has been described in the detailed description of the present disclosure, the present disclosure may be modified in various forms without departing from the scope of the present disclosure. Therefore, the scope of the present disclosure should not be defined as being limited to the embodiments, but should be defined by the appended claims and equivalents thereof.
Number | Date | Country | Kind |
---|---|---|---|
10-2015-0108836 | Jul 2015 | KR | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/KR2016/008403 | 7/29/2016 | WO | 00 |