Skip to content

Why the time of gc is increasing #1813

@jerry-weng

Description

@jerry-weng

I add some patch to calculate the execution time of ecma_gc_run function, which is located in thedeps/jerry/jerry-core/ecma/base/ecma-gc.c file, and print the time to stdout. So I can observe the consumed time of gc.

Then I run the following script:

!function next(){setTimeout(next, 10)}()

The log shows the time of gc is increasing.

jerry gc time consume: 0.054932
jerry gc time consume: 0.047852
jerry gc time consume: 0.352051
jerry gc time consume: 0.500977
jerry gc time consume: 0.703125
jerry gc time consume: 0.441162
jerry gc time consume: 0.473145
jerry gc time consume: 1.086914

...

jerry gc time consume: 1.934082
jerry gc time consume: 4.325928
jerry gc time consume: 2.452148
jerry gc time consume: 4.174072
jerry gc time consume: 5.083008
jerry gc time consume: 5.315918

...

jerry gc time consume: 6.258057
jerry gc time consume: 6.624023
jerry gc time consume: 6.314941
jerry gc time consume: 6.881836

Is it reasonable?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions