Skip to content

ScriptElementSupport#onAllChildrenAddedToPage is slow due to not needed HtmlScript#toString #277

@markusheiden

Description

@markusheiden

com.gargoylesoftware.htmlunit.html.ScriptElementSupport#onAllChildrenAddedToPage:

... new PostponedAction(element.getPage(), "Execution of script " + element)...

is very inefficient, because element (e.g. a HtmlScript) is rendered unnecessarily. This eats up all our CPUs, because it renders the whole HtmlScript in toString() in our case. I suggest to use e.g. "Execution of " + element.getClass().getSimpleName() instead or another more reduced string representation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions