Skip to content

History is hogging web app memory #3541

Open
@vladak

Description

@vladak

When thinking about #3243, I came to realize that the web app suffers from similar problem: in general whenever a history is requested, the History object representing the complete history of given file/directory is loaded into memory:

File file = cfg.getResourceFile(primePath);
History hist;
try {
hist = HistoryGuru.getInstance().getHistoryUI(file);

What's more, it is actually stored in the request:
request.setAttribute("history.jsp-hist", hist);

and used for paging.

Even for smaller repositories such as the OpenGrok Git repository this creates significant memory pressure. Here's a graph representing heap stats from a web app where I displayed history for couple of directories (including the top level directory) for indexed OpenGrok Git repository:
webapp-history

The Eden space grew by bunch of gigabytes !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions