In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
Developers can use the test suite to reproduce issues in isolation. When testing database schema recovery, the number of history messages may be significantly larger than the number of objects in the resulting schema (e.g. many repetitive CREATE and DROP statements related to the same object).
In this case, even if the resulting schema perfectly fits into memory, the history may not. As a result, an attempt to recover large history in the test suite results in an OOM error:
java.lang.OutOfMemoryError: Java heap space
Instead of reading the entire file at once and iterating the resulting list, read the file line by line.