Skip to content

On project creation memory usage reported incorrectly #5665

@ostephens

Description

@ostephens

To Reproduce

Steps to reproduce the behavior:

  1. Find a large data file that will take some time to create a project
  2. Then, create a project from the data file
  3. While the project creation is happening observe the memory usage reporting

Current Results

Memory usage is shown as consuming millions of percent of the available memory

Expected Behavior

A relative accurate (or at least possible!) indication of memory usage is expected

Screenshots

Screenshot from a recent forum posting
6cc9cd3f9749bfbffe890b3289f990e650c8dfc6

Source: https://forum.openrefine.org/t/large-csv-loading/478

Additional context

I think this commit is the problem 6a70463

I suspect the order of calculation for the memory means that only the Runtime.getRuntime().freeMemory() is divided by 1048576 to get the value in MB, leaving the Runtime.getRuntime().totalMemory() in bytes - which then leaves the percentage calculation as wildly inaccurate

Metadata

Metadata

Assignees

Labels

Good First IssueIndicates issues suitable for newcomers to design or coding, providing a gentle introduction.Type: BugIssues related to software defects or unexpected behavior, which require resolution.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions