Commit graph

9 commits

Author SHA1 Message Date
NBA2K1
8b1f7fc581 Add service disposal and lifecycle cleanup
This commit improves memory management, reduces redundant interpreter
instantiation, and standardizes service usage patterns.

- Add `dispose()` to `ExtensionService` interface and implement it across
  Dart, JS, LNReader, and Mihon services.
- Replace repeated interpreter creation in `DartExtensionService` with a
  persistent `_interpreter` instance initialized once in the constructor.
- Add disposal logic for JS DOM selector and Cheerio instances to prevent
  memory leaks.
- Introduce `withExtensionService()` helper to ensure services are always
  disposed after use.
- Update call sites across the codebase to use `withExtensionService()`
  or manual try/finally disposal.
- Improve isolate service message handling by extracting `responsePort`
  earlier.
- Ensure safer defaults (e.g., returning empty lists, const lists) when
  service calls fail.
2026-01-13 01:11:19 +01:00
Moustapha Kodjo Amadou
29fe96151d fix: enable logger usage in isolate service 2025-11-12 17:02:06 +01:00
Moustapha Kodjo Amadou
430e062a06 Fix attribute handling in JsHtmlParser to assign empty string for attributes without values 2025-11-07 19:17:57 +01:00
Moustapha Kodjo Amadou
2ff20c35cc + 2025-10-22 10:51:25 +01:00
Moustapha Kodjo Amadou
1f27c129a5 Fix null handling in SourceNovel.fromJson for name and path fields 2025-10-13 13:25:29 +01:00
Moustapha Kodjo Amadou
73a61c9003 reverse chapters 2025-10-13 11:30:55 +01:00
Schnitzel5
5e05c4e9aa some refactoring 2025-10-11 21:59:46 +02:00
Schnitzel5
b8a7bbbbb4 + 2025-10-11 17:56:52 +02:00
Schnitzel5
5ef46ec13d adding support for LNReader plugins 2025-10-10 15:49:33 +02:00