[PR #9] [MERGED] Fix heap out of memory crash when scraping large wikis #13

Closed
opened 2026-10-15 18:03:11 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/SillyTavern-Fandom-Scraper/pull/9
Author: @Nidelon
Created: 11/26/2025
Status: ✅ Merged
Merged: 11/26/2025
Merged by: @Cohee1207

Base: main ← Head: main


📝 Commits (3)

📊 Changes

2 files changed (+22 additions, -7 deletions)

View changed files

📝 dist/plugin.js (+1 -1)
📝 src/index.ts (+21 -6)

📄 Description

The plugin was crashing on large wikis because it tried to hold all the raw downloaded data in memory at once until the scrape finished. I changed the code to process the data chunk by chunk as it downloads instead of waiting for the end. This keeps memory usage low and prevents the server from running out of heap space. #8


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SillyTavern/SillyTavern-Fandom-Scraper/pull/9 **Author:** [@Nidelon](https://github.com/Nidelon) **Created:** 11/26/2025 **Status:** ✅ Merged **Merged:** 11/26/2025 **Merged by:** [@Cohee1207](https://github.com/Cohee1207) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`7c283c4`](https://github.com/SillyTavern/SillyTavern-Fandom-Scraper/commit/7c283c43dbf1bd99279b686387093b6ff7607b10) optimize memory usage in scraping functions - [`08eea68`](https://github.com/SillyTavern/SillyTavern-Fandom-Scraper/commit/08eea681f1a9a194181ecfaff94fd9a90c6a2080) build - [`f7ecfe1`](https://github.com/SillyTavern/SillyTavern-Fandom-Scraper/commit/f7ecfe1a62f1f900f7c9134fb05f5619ebd8c7d4) Remove trailing spaces ### 📊 Changes **2 files changed** (+22 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `dist/plugin.js` (+1 -1) 📝 `src/index.ts` (+21 -6) </details> ### 📄 Description The plugin was crashing on large wikis because it tried to hold all the raw downloaded data in memory at once until the scrape finished. I changed the code to process the data chunk by chunk as it downloads instead of waiting for the end. This keeps memory usage low and prevents the server from running out of heap space. #8 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 18:03:11 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
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
SillyTavern/SillyTavern-Fandom-Scraper#13
No description provided.