# US 8,751,546 B1 · Systems and methods for minimizing the effects of garbage collection

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,751,546 B1
- Document ID: US8751546B1
- Status: Granted
- Kind: B1
- Application number: 13/345,483
- Filed: 2012-01-06
- Granted: 2014-06-10
- Earliest claimed: 2012-01-06
- Assignees: Google Inc.
- Applicants: Andrew Alexander Grieve
- Inventors: Andrew Alexander Grieve
- Web page: https://patentgrep.com/patent/US8751546B1

## CPC

- G06F 9/4843: {by program, e.g. task dispatcher, supervisor, operating system}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Apparent performance delays in a computer application are reduced by scheduling garbage collection during periods when a user cannot modify program data within the application. Garbage collection may be initiated in response to detecting a user interface event that prevents user modification of program data being processed by the computer application. Systems and methods herein reduce the appearance of performance delays associated with garbage collection.

## Claims

### Claim 1

A method of scheduling garbage collection for a computer application comprising:
detecting a user interface event by a computer running the computer application;
determining by the computer whether the user interface event prevents user modification of program data being processed by the computer application, wherein the user interface event, when executed, causes the computer application to execute a function associated with an animation that lasts a performance time longer than a predetermined threshold;
in response to determining that the user interface event prevents user modification of the program data being processed by the computer application, initiating garbage collection by the computer, wherein the garbage collection process is masked by the user interface event so there is no noticeable pause to the user;
scaling the performance time of the animation to last at least an expected time duration of a garbage collection process, wherein scaling the performance time of the animation increases a time duration of the animation;
detecting a second user interface event that reenables user modification of the program data; and
in response to detecting the second event, interrupting the garbage collection.

### Claim 2 (depends on 1)

The method according to claim 1, wherein initiating garbage collection comprises initiating garbage collection on a portion of memory not associated with the memory used to implement the animation.

### Claim 3 (depends on 2)

The method according to claim 2, comprising, subsequently initiating a second garbage collection process on the remaining memory associated with implementing the animation after the animation is complete.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the program data comprises an electronic document.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the animation comprises one of a scrolling and a panning of the electronic document.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the user interface event comprises an instruction to the computer application to process a second electronic document.

### Claim 7 (depends on 4)

The method according to claim 4, wherein the user interface event comprises an instruction to transition between discrete portions of the electronic document.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the discrete portions comprise one of slides of a presentation, pages of a document, and sheets of a spreadsheet.

### Claim 9

A system for scheduling garbage collection for a computer application, comprising:
a processor,
a memory storing computer executable instructions, which when executed by the processor cause the processor to:
detect a user interface event;
determine whether the user interface event prevents user modification of program data being processed by the computer application, wherein the user interface event, when executed, causes the computer application to execute a function associated with an animation that lasts a performance time longer than a predetermined threshold;
in response to determining that the user interface event prevents user modification of the program data being processed by the computer application, initiate garbage collection, wherein the garbage collection process is masked by the user interface event so there is no noticeable pause to the user;
scale the performance time of the animation to last at least an expected time duration of a garbage collection process, wherein scaling the performance time of the animation increases a time duration of the animation;
detect a second user interface that reenables user modification of the program data; and
in response to detecting the second event, interrupt the garbage collection.

### Claim 10 (depends on 9)

The system according to claim 9, wherein initiating garbage collection comprises initiating garbage collection on a portion of memory not associated with the memory used to implement the animation.

### Claim 11 (depends on 10)

The system according to claim 10, wherein the computer executable instructions, when executed by the processor cause the processor to subsequently initiate a second garbage collection process on the remaining memory associated with implementing the animation after the animation is complete.

### Claim 12 (depends on 9)

The system according to claim 9, wherein the program data comprises an electronic document.

### Claim 13 (depends on 12)

The system according to claim 12, wherein the animation comprises one of a scrolling and a panning of the electronic document.

### Claim 14 (depends on 12)

The system according to claim 12, wherein the user interface event comprises an instruction to the computer application to process a second electronic document.

### Claim 15 (depends on 12)

The system according to claim 12, wherein the user interface event comprises an instruction to transition between discrete portions of the electronic document.

### Claim 16 (depends on 15)

The system according to claim 15, wherein the discrete portions comprise one of slides of a presentation, pages of a document, and sheets of a spreadsheet.

### Claim 17

A method of scheduling garbage collection for a computer application comprising:
detecting a user interface event by a computer running the computer application, wherein the user interface event, when executed, causes the computer application to execute a function associated with an animation that lasts a performance time longer than a predetermined threshold;
determining by the computer whether the animation prevents user modification of program data being processed by the computer application;
scaling the performance time of the animation to last at least an expected time duration of a first garbage collection process, wherein scaling the performance time of the animation increases a time duration of the animation;
in response to determining that the user interface event prevents user modification of the program data being processed by the computer application:
initiating the first garbage collection process by the computer on a portion of memory not associated with the memory used to implement the animation, wherein the first garbage collection process is masked by the user interface event so there is no noticeable pause to the user, and
initiating a second garbage collection process by the computer on the remaining memory associated with implementing the animation after the animation is complete, wherein the second garbage collection process is masked by the user interface event so there is no noticeable pause to the user, and
detecting a second user interface event that reenables user modification of the program data; and
in response to detecting the second event, interrupting the first garbage collection process and the second garbage collection process.

### Claim 18

A system for scheduling garbage collection for a computer application, comprising:
a processor,
a memory storing computer executable instructions, which when executed by the processor cause the processor to:
detect a user interface event which when executed, causes the computer application to execute a function associated with an animation that lasts a performance time longer than a predetermined threshold;
determine whether the user interface event prevents user modification of program data being processed by the computer application;
scale the performance time of the animation to last at least an expected time duration of a first garbage collection process, wherein scaling the performance time of the animation increases a time duration of the animation;
in response to determining that the user interface event prevents user modification of the program data being processed by the computer application:
initiate the first garbage collection process on a portion of memory not associated with the memory used to implement the animation, wherein the first garbage collection process is masked by the user interface event so there is no noticeable pause to the user, and
initiate a second garbage collection process on the remaining memory associated with implementing the animation after the animation is complete, wherein the second garbage collection process is masked by the user interface event so there is no noticeable pause to the user, and
detect a second user interface event that reenables user modification of the program data; and
in response to detecting the second event, interrupt the first garbage collection process and the second garbage collection process.

### Claim 19

A method of scheduling garbage collection for a computer application comprising:
detecting a user interface event by a computer running the computer application;
determining by the computer whether the user interface event prevents user modification of program data being processed by the computer application, wherein the user interface event, when executed, causes the computer application to execute a function associated with an animation that lasts a performance time longer than a predetermined threshold;
in response to determining that the user interface event prevents user modification of the program data being processed by the computer application, initiating garbage collection by the computer, wherein the garbage collection process is masked by the user interface event so there is no noticeable pause to the user;
scaling the performance time of the animation to last at least an expected time duration of a garbage collection process, wherein scaling the performance time of the animation increases a time duration of the animation; and
continuing to prevent user modification of the program data until completion of the garbage collection.

### Claim 20

A system for scheduling garbage collection for a computer application, comprising:
a processor,
a memory storing computer executable instructions, which when executed by the processor cause the processor to:
detect a user interface event;
determine whether the user interface event prevents user modification of program data being processed by the computer application, wherein the user interface event, when executed, causes the computer application to execute a function associated with an animation that lasts a performance time longer than a predetermined threshold;
in response to determining that the user interface event prevents user modification of the program data being processed by the computer application, initiate garbage collection, wherein the garbage collection process is masked by the user interface event so there is no noticeable pause to the user;
scale the performance time of the animation to last at least an expected time duration of a garbage collection process, wherein scaling the performance time of the animation increases a time duration of the animation; and
continue to prevent user modification of the program data until completion of the garbage collection.
