The present disclosure relates generally to online document processors, and more particularly to asynchronous redrawing in online document processors.
Various system architectures have been developed for users to access computer applications, such as word processors, spreadsheets, and drawing programs. In one architecture, applications software is loaded onto a personal computer accessed by a single user. For multiple users, each user has an individual personal computer, and individual copies of applications software are loaded onto each personal computer. In another architecture, applications software is loaded onto an applications server connected to a communications network. Multiple users can simultaneously access the applications server via the communications network.
Widespread deployment of the Internet has accelerated developments in cloud computing, in which applications are viewed as online services provided by an applications services provider. Details of software and hardware are transparent to the user. A user accesses the Internet via a communications device, such as a personal computer, and, using a web browser, logs onto the website of an applications services provider. The user then launches an application such as a word processor.
The user provides input to the application and receives output from the application via a graphical user interface. In response to user input, the application performs certain operations. Web browsers are typically single threaded. While the application is performing certain operations, the user can be blocked from entering further input. If the hold time is too long, the user experience can be unsatisfactory. What are needed are methods and apparatus for reducing the hold time for online applications.
A user accesses an online document processor via user equipment and a communications network. The user provides input to and receives output from the online document processor via a web browser and a graphical user interface viewed on a video display. When the online document processor receives a download command or an edit command, the online document processor redraws the document to generate a specified graphical layout. During a synchronous redraw operation, the entire redraw operation needs to be completed before the online document processor accepts further user input. In embodiments disclosed herein, certain redraw operations are performed asynchronously. These redraw operations can be interrupted prior to completion, and new user input can be accepted.
Downloading a document refers to the operation of transmitting the document from an application server to user equipment. The downloading process is controlled by the online document processor in response to receiving a user command. The operation of redrawing a document refers to the operation of formatting the layout of the document. The redraw operation is performed by the online document processor. The layout of the document includes graphical characteristics such as margins, pagination, line spacing, fonts, bolding, underlining, headers, footers, comments, drawings, and images. Redrawing a document includes the first instance in which a document is drawn.
Edit operations include operations that change the contents of the document and operations that change the layout of the document. Edit operations also include operations that change the displayed portion of the document, but not the content or layout of the document; for example, scrolling through a document is considered to be an edit operation. Printing a document is also considered to be an edit operation.
In a first configuration, a document has been previously stored on an applications server. In response to receiving a download command, the online document processor downloads a first portion of the document to user equipment, redraws the first portion of the document, and then downloads a second portion of the document. In one embodiment, the first portion of the document ends at a location determined by a sum of a document end-of-display point and a buffer length; the buffer length is greater than or equal to zero. After downloading the second portion of the document has been completed, the online document processor waits for a maximum of a first predetermined time interval for an edit command to be received. If an edit command is received within the first predetermined time interval, then the online document processor executes the edit command. If an edit command is not received within the first predetermined time interval, then the online document processor proceeds to redraw at least a part of the second portion of the document.
In one embodiment, time intervals for receiving edit commands are alternated with time intervals for performing downloading and redrawing operations. If no edit command is received within the first predetermined time interval, redrawing at least a part of the second portion of the document is performed for a maximum of a second predetermined time interval. The online document processor then waits for a maximum of a third predetermined time interval for receipt of an edit command.
In one embodiment, in response to receiving an edit command, the online document processor performs one of the following redraw operations:
(a) Redrawing the first portion of the document and the second portion of the document;
(b) Downloading a third portion of the document, in which the third portion includes the remaining portion of the document not previously downloaded, and redrawing the entire document;
(c) Redrawing a third portion of the document, in which the third portion of the document ends at a location determined by a sum of a document end-of-display point and a buffer length;
(d) Redrawing a third portion of the document, in which the third portion of the document ends at a location determined by a sum of a document scroll point and a buffer length; and
(e) Redrawing a third portion of the document, in which the third portion ends at a location determined by a sum of a document spacer index and a buffer length.
The buffer length referred to in the above operations is greater than or equal to zero.
In a second configuration, a new document or a previously downloaded document is edited by an online document processor. In response to receiving an edit command, the online document processor selects one of several redraw operations. For edit commands in which the document display needs to be updated before a new edit command can be processed, the portion of the document up to and including a specified location (plus a buffer length) is redrawn. For other edit commands, the online document processor operates in a time division multiplex mode in which time intervals for receiving new edit commands are alternated with time intervals for performing redraw operations.
Redraw operations for edit commands in which the document display needs to be updated before a new edit command can be processed include the following redraw operations:
(a) Redrawing the entire document;
(b) Redrawing a portion of the document, in which the portion of the document ends at a location determined by a sum of a document end-of-display point and a buffer length;
(c) Redrawing a portion of the document, in which the portion of the document ends at a location determined by a sum of a document scroll point and a buffer length; and
(d) Redrawing a portion of the document, in which the portion ends at a location determined by a sum of a document spacer index and a buffer length.
The buffer length referred to in the above operations is greater than or equal to zero.
This disclosure discloses methods for performing embodiments of the redraw operations, computer readable media storing computer program instructions defining steps for performing embodiments of the redraw operations, and applications servers configured to execute computer program instructions defining steps for performing embodiments of the redraw operations.
This disclosure further discloses at least the following apparatus: (1) An apparatus for redrawing with an online document processor a document stored on an applications server, wherein the apparatus comprises: (a) means for receiving a download command; (b) means for downloading a first portion of the document; (c) means for redrawing the first portion of the document; (d) means for downloading a second portion of the document; (e) means for, in response to receiving an edit command within a predetermined time interval starting from completion of the downloading of the second portion of the document, executing the received edit command; and (f) means for, in response to not receiving an edit command within the predetermined time interval, redrawing at least a part of the second portion of the document. (2) An apparatus for redrawing a document with an online document processor, wherein the apparatus comprises: (a) means for receiving an edit command; and (b) means for, based on the received edit command, (i) redrawing the entire document; (ii) redrawing a portion of the document, the portion ending at a location determined by a sum of a document end-of-display point and a buffer length, wherein the buffer length is greater than or equal to zero; (iii) redrawing a portion of the document, the portion ending at a location determined by a sum of a document scroll point and a buffer length, wherein the buffer length is greater than or equal to zero; (iv) redrawing a portion of the document, the portion ending at a location determined by a sum of a document spacer index and a buffer length, wherein the buffer length is greater than or equal to zero; or (v) redrawing a portion of the document for a maximum of a predetermined time interval.
These and other advantages of the disclosure will be apparent to those of ordinary skill in the art by reference to the following detailed description and the accompanying drawings.
One or more users, such as user 1120-user 3124, access applications server 1110 and applications server 2112 via user equipment, such as user equipment 1130-user equipment 3134, respectively, that communicate with communications network 102. Examples of user equipment include personal computers, laptop computers, personal digital assistants, and cell phones. The communications links can be wired or wireless. In the example shown in
Examples of typical applications include word processors, spreadsheets, presentation programs, and drawing programs. The distinction between various types of applications has blurred since several functions can be commingled in a single application. For example, pictures can be inserted into a page of text, and some word processors have integral drawing programs. Furthermore, word processors, spreadsheets, presentation programs, and drawing programs can be embedded into one another. For example, a spreadsheet or drawing program can be embedded in a word processor, and the spreadsheet or drawing program can be launched from within the word processor.
Herein, a document processor refers to a computer application that receives, as user input, text or a combination of text and graphical elements; performs a user-specified operation or set of operations on the user input; and generates, as user output, text or a combination of text and graphical elements. The user output is referred to as a document. In an embodiment, a document is stored as a computer file. Portions of, or the entirety of, a document can be displayed on a video display or printed on a printer.
In an embodiment, application 1 is a document processor. When application 1 is launched, an applications window is opened.
The following sets of figures [(
In an embodiment, a document has been previously created and stored on an online document processor. To edit the document, the online document processor first downloads the document to user equipment. Herein, downloading a document refers to transmitting the document from an application server to user equipment. The downloading process is controlled by the online document processor in response to receiving a user command. With a single-threaded browser, the user cannot perform edit operations on the document during the downloading process. If the document length is substantial, or if the document has complex contents (such as images), the download time can be substantial, and the user experience can be unsatisfactory. In common operation, the entire document is first downloaded. The entire document is then redrawn, and a portion of the document is displayed. The user then proceeds to edit the document.
Herein, the operation of redrawing a document refers to the operation of formatting the layout of the document. The redrawing operation is performed by the online document processor. The layout of the document includes graphical characteristics such as margins, pagination, line spacing, fonts, bolding, underlining, headers, footers, comments, drawings, and images. Herein, redrawing a document includes the first instance in which a document is drawn.
In a synchronous redrawing operation, the document is redrawn upon receiving a user command that requires a redrawing operation. During the redrawing operation, a new user command cannot be processed. A new user command is processed only upon completion of the redrawing operation. Embodiments of redrawing operations described below perform asynchronous redrawing operations. In an asynchronous redrawing operation, a portion of a redrawing operation can be delayed or interrupted. A new user command can be processed before the redrawing operation has been completed, and the redrawing operation can be completed at a later time.
In an embodiment, the location within a document is determined with respect to the beginning (also referred to as the top) of the document. The portion of the document between the top of the document and a location of interest is referred to as a portion of the document above the location of interest. The portion of the document between the location of interest and the end (also referred to as the bottom) of the document is referred to as a portion of the document below the location of interest.
In an embodiment, a portion of interest of a document is displayed in a display field at a particular time of interest. The layout of the displayed portion of interest is determined both by the layout of the displayed portion of interest and the layout of the portion of the document above the displayed portion of interest (for example, changes in margins can change pagination). The layout of the displayed portion of interest is not affected by the layout of the portion of the document below the displayed portion of interest.
Herein, a location in the display field is mapped to a location in the displayed portion of the document, and a location in the displayed portion of the document is mapped to a location in the display field. Herein, a location in the document is referred to as a document location, and a location in the display field is referred to as a display location.
For example, refer back to
Mapping between a document location and a display location can be performed by various methods. In an embodiment, the document includes only lines of text. The online document processor stores the height (in pixels) of every document line of text. The online document processor receives from the web browser the height (in pixels) of the display field. When the document is downloaded, the number of document lines mapped to the display field is calculated from the height of the display field and the height of each document line.
During a scroll operation, the online document processor tracks how far down from the top of the document the user has scrolled. The document line mapped to the top of the display field is determined by summing the heights of all the lines from the top of the document until the sum of the heights equals the distance that has been scrolled. The document line mapped to the bottom of the display field is determined by adding document lines to the document line mapped to the top of the display field until the sum of the heights of the additional document lines equals the height of the display field. One skilled in the art can implement similar methods for documents including graphical elements.
In general, a user performs edit operations based on the displayed portion of interest. As discussed above, with a single-threaded browser, a user cannot enter new user input while the document is being downloaded or redrawn. To reduce the hold time between user inputs, embodiments initially process only those portions of the document that affect the displayed portion of interest. Processing of the portions below the displayed portion of interest are deferred.
Refer to
The process then passes to block 1114, in which the document location at the end of the redrawn portion is compared to the document end-of-display point (DOC E-O-D PT). As discussed above, the document end-of-display point is the location in the document mapped to the display end-of-display point in the display field of a user's video display. If the document end-of-display point has not been reached, then the process passes to block 1120, in which downloading of the document is continued. The process then passes to block 1122, in which redrawing of the document is continued, and then to block 1124, in which the display field is updated.
The process then returns to block 1114. If the document end-of-display point has been reached, then the process passes to block 1130, in which downloading is continued until a buffer is filled. The size of a buffer is specified by a buffer length. In an embodiment, the buffer length corresponds to a number of lines in the document or to the number of lines equivalent to the space occupied by a graphical object such as an image. In an embodiment, a buffer size sufficient to hold one or two nominal paragraphs is used.
The process then passes to block 1132, in which a timer 1 is started. The process then passes to block 1136, in which receipt of an edit command is determined. If no edit command has been received, then the process passes to block 1138, in which the elapsed time is determined and compared to a predetermined maximum time T1MAX. Herein, a timer expires when the elapsed time from the start of the timer reaches a predetermined maximum time. If the elapsed time is less than T1MAX, then the process returns to block 1136. One skilled in the art can set the value of the predetermined maximum time T1MAX (and the values of the predetermined maximum time T2MAX and predetermined maximum time T3MAX, described below) to provide an appropriate balance between the time allocated for receiving an edit command and the time allocated for performing a redraw operation. Further consideration of time intervals is discussed below.
If the elapsed time is greater than or equal to T1MAX, then the process passes to block 1140 (
Now refer back to block 1144. If the elapsed time is greater than or equal to T2MAX, then the process passes to block 1148, in which the state of the buffer is determined. If the buffer is empty, then the process passes to block 1190 (
Refer to
Now refer back to block 1136 in
The view, scroll, and spacer index modes are used to provide the highest priority for the redraw operation. The displayed portion of the document needs to be up-to-date before the user enters the next edit command. The time mode is used when the entire redraw operation does not to be completed before the user enters the next edit command. For example, a global reset of the margins of a long, complex document can require substantial processing time. Once the margins up to and including the portion of interest have been reset, however, resetting the margins on the remaining portion of the document can be deferred.
In the time mode, the document processor operates in a time division multiplex mode. The document processor performs a sequence of operations in which a time interval (referred to herein as an edit time interval) for accepting an edit command is alternated with a time interval (referred to herein as a redraw time interval) for performing a redraw operation. The edit time interval and the redraw time interval can both be independently set. In some embodiments, the edit time interval is equal to the redraw time interval. In other embodiments, the edit time interval is not equal to the redraw time interval. If the hold time that the user needs to wait between entries of consecutive edit commands is less than a maximum value, the user experience is satisfactory. In an embodiment, the maximum value is approximately 200 milliseconds.
Refer now back to block 1152. If the all mode 1152 is selected, then the process passes to block 1154, in which all of the downloaded portion of the document is redrawn. In some instances, the remaining portion of the document (that is, the portion of the document that has not yet been downloaded) is downloaded, and the entire document is redrawn.
If the view mode 1156 is selected, then the process passes to block 1158, in which the portion of the document up to and including the document end-of-display point is redrawn. An additional portion of the document below the document end-of-display point can be redrawn as a buffer. In general, in the view mode, the portion of the document redrawn ends at the document end-of-display point plus a buffer length, where the buffer length is greater than or equal to zero. The process then passes to block 1190 (
If the scroll mode 1160 is selected, then the process passes to block 1162, in which the portion of the document up to and including a document scroll point (DOC SCROLL PT) is redrawn. The document scroll point is a location in the displayed portion of the document mapped to a location in the display field upon completion of a scroll operation. The document scroll point can be the same as the document end-of-display point. An additional portion of the document below the document scroll point can be redrawn as a buffer. In general, in the scroll mode, the portion of the document redrawn ends at the document scroll point plus a buffer length, where the buffer length is greater than or equal to zero. The process then passes to block 1190 (
If the spacer index mode 1164 is selected, then the process passes to block 1166, in which the portion of the document up to and including a document spacer index is redrawn. Spacer indexes were previously described in reference to
If the time mode 1170 is selected, then the process passes to block 1172, in which a timer 3 is started. The process then passes to block 1174, in which redrawing of the contents of the buffer is started. The process then passes to block 1176, in which the elapsed time is determined and compared to a predetermined maximum time T3MAX. If the elapsed time is less than T3MAX, then the process passes to block 1178, in which the state of the buffer is determined. If the buffer is not empty, then the process returns to block 1174. If the buffer is empty, then the process passes to block 1190 (
Now refer back to block 1176. If the elapsed time is greater than or equal to T3MAX, then the process passes to block 1180, in which the state of the buffer is determined. If the buffer is empty, then the process passes to block 1190 (
Refer to
If the all mode 1230 is selected, then the process passes to block 1232, in which all of the document (the entire document) is redrawn. The process then returns to block 1202 (
If the view mode 1240 is selected, then the process passes to block 1242, in which the portion of the document up to and including the document end-of-display point is redrawn. An additional portion of the document below the document end-of-display point can be redrawn as a buffer. In general, in the view mode, the portion of the document redrawn ends at the document end-of-display point plus a buffer length, where the buffer length is greater than or equal to zero. The process then returns to block 1202 (
If the scroll mode 1250 is selected, then the process passes to block 1252, in which the portion of the document up to and including a document scroll point (DOC SCROLL PT) is redrawn. The document scroll point is a location in the displayed portion of the document mapped to a location in the display field upon completion of a scroll operation. The document scroll point can be the same as the document end-of-display point. An additional portion of the document below the document scroll point can be redrawn as a buffer. In general, in the scroll mode, the portion of the document redrawn ends at the document scroll point plus a buffer length, where the buffer length is greater than or equal to zero. The process then returns to block 1202 (
If the spacer index mode 1260 is selected, then the process passes to block 1262, in which the portion of the document up to and including a document spacer index is redrawn. Spacer indexes were previously described in reference to
If the time mode 1270 is selected, then the process passes to block 1272, in which a buffer is filled. The process then passes to block 1274, in which a timer 1 is started. The process then passes to block 1276, in which redrawing of the contents of the buffer is started. The process then passes to block 1280, in which the elapsed time is determined and compared to a predetermined maximum time T1MAX. If the elapsed time is less than T1MAX, then the process passes to block 1278, in which the state of the buffer is determined. If the buffer is not empty, then the process returns to block 1276. If the buffer is empty, then the process returns to block 1202 (
Now refer back to block 1280. If the elapsed time is greater than or equal to T1MAX, then the process passes to block 1282, in which the state of the buffer is determined. If the buffer is empty, then the process returns to block 1202 (
Now refer back to block 1292. If an edit command has been received, then the process returns to block 1220 (
Systems, apparatus, and methods described herein can be implemented with digital circuitry or with one or more computers. A computer includes well-known processors, memory units, storage devices, software, and other components. Typically, a computer includes one or more processors for executing computer program instructions and one or more memory units for storing data, including computer programming instructions. A computer can also include, or be operatively coupled to, one or more mass storage devices. A mass storage device can be a fixed internal device or a removable external device. Examples of mass storage devices include magnetic hard drives, optical disks, magneto-optical disks, and non-volatile semiconductor memory.
Systems, apparatus, and methods described herein can be implemented with computers operating in a client-server relationship. Typically, the client computers are located remotely from the server computer. The client computers communicate with the server computer via a communications network. The client-server relationship can be defined by, and controlled by, computer programs running on the respective client and server computers.
Systems, apparatus, and methods described herein can be used within a network-based cloud-computing system. In a network-based cloud-computing system, a computer server communicates with one or more client computers via a communications network. A client computer can communicate with the server computer, for example, via a network browser application residing on and operating on the client computer. A client computer can store and access data on the server computer via the communications network. A client computer can transmit requests for data and requests for online services to the server computer via the communications network. The server computer can perform the requested services and provide data to the client computer via the communications network. The server computer can also transmit computer program instructions and data adapted to cause a client computer to perform a specified function, such as performing a calculation or displaying specified data on a video display.
Systems, apparatus, and methods described herein can be implemented using a computer program tangibly embodied in an information carrier, such as a non-transitory machine-readable storage device, for execution by a programmable processor. The method steps described herein can be implemented using one or more computer programs that are executable by a programmable processor. A computer program is a set of computer program instructions that can be used, directly or indirectly, in a computer to perform a specified activity or bring about a specified result. A computer program can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including a stand-alone program or a module, component, subroutine, or other unit suitable for use in a computing environment.
Computational system 1302 includes computer 1310, which includes a central processing unit (CPU) 1312, memory 1314, and data storage device 1316. Data storage device 1316 includes at least one non-transitory, persistent, tangible computer readable medium, such as a hard drive, compact disc, or non-volatile semiconductor memory.
Computational system 1302 can further include local input/output interface 1320, which interfaces computer 1310 with local input/output device 1330, such as a keyboard, mouse, or local access terminal. Data, including computer executable code, can be transferred to and from computer 1310 via local input/output interface 1320. Computational system 1302 can further include video display interface 1322, which drives video display 1332. Computational system 1302 can also receive input via video interface 1322 (for example, if video display 1332 includes a touch screen). Note that, in this instance, local input/output device 1330 and video display 1332 are operated by an applications service provider and not by an end user (examples of end users include user 1120-user 3124 in
Computational system 1302 can further include communications network interface 1324, which interfaces computer 1310 with communications networks, such as local area networks and wide area networks. An example of a communications network is communications network 102 in
As is well known, a computer operates under control of computer software, which defines the overall operation of the computer and applications. CPU 1312 controls the overall operation of the computer and applications by executing computer program instructions that define the overall operation and applications. The computer program instructions can be stored in data storage device 1316 and loaded into memory 1314 when execution of the program instructions is desired. The methods shown in the flowcharts in
The foregoing Detailed Description is to be understood as being in every respect illustrative and exemplary, but not restrictive, and the scope of the invention disclosed herein is not to be determined from the Detailed Description, but rather from the claims as interpreted according to the full breadth permitted by the patent laws. It is to be understood that the embodiments shown and described herein are only illustrative of the principles of the present invention and that various modifications may be implemented by those skilled in the art without departing from the scope and spirit of the invention. Those skilled in the art could implement various other feature combinations without departing from the scope and spirit of the invention.
This application claims the benefit of U.S. Provisional Application No. 61/384,773 filed Sep. 21, 2010, which is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
61384773 | Sep 2010 | US |