High RAM consumption during "parsing story ..." #7

Closed
opened 2019-03-02 21:02:51 -06:00 by ByFernanz · 5 comments
ByFernanz commented 2019-03-02 21:02:51 -06:00 (Migrated from github.com)

I work on a Toshiba 2 Swanky Chromebook, with ubuntu 16.04 64 bits, I do not know if that influences. I have 4 gigabytes of RAM and 1 of SWAP. I realized that the more scenes I put, the consumption of the increased alarmingly. I have about 20 interconnected scenes with some 10 variables. Compiling swallows the entire ram and almost the entire swap.

I work on a Toshiba 2 Swanky Chromebook, with ubuntu 16.04 64 bits, I do not know if that influences. I have 4 gigabytes of RAM and 1 of SWAP. I realized that the more scenes I put, the consumption of the increased alarmingly. I have about 20 interconnected scenes with some 10 variables. Compiling swallows the entire ram and almost the entire swap.
ByFernanz commented 2019-03-04 12:24:44 -06:00 (Migrated from github.com)

Even eliminating all uses of [] (?) [] (&) [] (#) Consumes an exorbitant amount of RAM. It is only a file with several sections ## and links with nothing of mathematics. There must be some bug, because pandoc compiles it in seconds and with very few resources.

Even eliminating all uses of [] (?) [] (&) [] (#) Consumes an exorbitant amount of RAM. It is only a file with several sections ## and links with nothing of mathematics. There must be some bug, because pandoc compiles it in seconds and with very few resources.

@ByFernanz is there a chance you could share a story file with me that exhibits this behavior?

It is possible for the number of scenes to increase exponentially depending on the various possible variable configurations. The calculation for most pages needed would be scenes * 2 ^ variables. In the case of ten variables and twenty scenes you get 20 * 2 ^ 10 = 20 * 1,024 = 20,480, so assuming that all ten of your variables come into play at the final scene(s) of your story, it may have to resolve and generate over 20 thousand pages.

Even so, I wouldn't expect that to saturate 5gb of RAM, so it is possible there is a bug or inefficiency going on that I haven't been able to reproduce.

@ByFernanz is there a chance you could share a story file with me that exhibits this behavior? It is possible for the number of scenes to increase exponentially depending on the various possible variable configurations. The calculation for most pages needed would be `scenes * 2 ^ variables`. In the case of ten variables and twenty scenes you get `20 * 2 ^ 10 = 20 * 1,024 = 20,480`, so assuming that all ten of your variables come into play at the final scene(s) of your story, it may have to resolve and generate over 20 thousand pages. Even so, I wouldn't expect that to saturate 5gb of RAM, so it is possible there is a bug or inefficiency going on that I haven't been able to reproduce.
ByFernanz commented 2019-05-13 09:37:52 -05:00 (Migrated from github.com)

Of course! There I share it with you. The file must have more than 70 sections. I attach the version for ficdown as the one of pandoc. In Pandoc only consumes 50mb of ram and with low processor consumption and produces the html in a few seconds. Ficdown stays compiling, devoting more and more ram, I consume 50% of the processor, until I have to kill the process.

test-ficdown-pandoc.zip

Of course! There I share it with you. The file must have more than 70 sections. I attach the version for ficdown as the one of pandoc. In Pandoc only consumes 50mb of ram and with low processor consumption and produces the html in a few seconds. Ficdown stays compiling, devoting more and more ram, I consume 50% of the processor, until I have to kill the process. [test-ficdown-pandoc.zip](https://github.com/rudism/Ficdown/files/3173375/test-ficdown-pandoc.zip)

This may be fixed in v1.1.1 now.

This may be fixed in v1.1.1 now.

Closing due to inactivity.

Closing due to inactivity.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rudism/ficdown#7
No description provided.