Refs #609 (high RAM with stutters). Manga / anime covers from sources are typically 720x1080 or larger (~3 MB decoded RGBA per cover). The library grid, library list and generic browse / search card widgets render those covers at roughly 150x220 logical pixels, but every cover decoded to its full source resolution and that decoded bitmap landed in Flutter's `imageCache`. With 30-50 covers in flight during a normal scroll, the default 100 MB cache filled and the engine started evicting + re-decoding aggressively — exactly the symptom in #609 (stutters + high RAM). Mangayomi already had `ExtendedResizeImage` available via the `extended_image_library` package and used it in one place (`cachedCompressedNetworkImage`, called only from the History screen). This commit generalises that pattern. Add a `coverProvider()` helper in `lib/utils/cached_network.dart` that wraps `CustomExtendedNetworkImageProvider` in `ExtendedResizeImage` with a 200 KB encoded budget — sharp at typical thumbnail size on high-DPR screens, ~3.6x smaller decoded than a full-resolution cover. Pass through the same `cache` / `cacheMaxAge` knobs the underlying provider exposes so existing disk-cache behaviour is preserved. Swap the three high-traffic thumbnail call sites to use it: * `lib/modules/library/widgets/library_gridview_widget.dart` * `lib/modules/library/widgets/library_listview_widget.dart` * `lib/modules/widgets/manga_image_card_widget.dart` (both `MangaImageCardWidget` and `MangaImageCardListTileWidget`, used by browse and search results) Deliberately not changed: * The manga / anime detail page hero cover — large display, full resolution is appropriate. * Reader pages — already memory-managed by `ChapterPreloadManager` and need full resolution for actual reading. * `cachedNetworkImage()` and other lower-traffic thumbnail surfaces (tracker results, calendar, recommendation grid). Easy to extend in a follow-up if anyone asks; kept narrow here so review is manageable. Verified * `flutter analyze` clean on every touched file * `flutter build macos --release` succeeds * Smoke-tested on macOS with the local-all-fixes build: library grid, library list and browse card all render identical-looking covers at typical thumbnail sizes; no visible quality regression at the displayed scale |
||
|---|---|---|
| .github | ||
| android | ||
| assets | ||
| go | ||
| ios | ||
| lib | ||
| linux | ||
| macos | ||
| packaging/arch | ||
| proto | ||
| repo | ||
| rust | ||
| rust_builder | ||
| test | ||
| windows | ||
| .gitignore | ||
| analysis_options.yaml | ||
| devtools_options.yaml | ||
| ffigen.yaml | ||
| flutter_rust_bridge.yaml | ||
| l10n.yaml | ||
| LICENSE | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
Mangayomi
Mangayomi is an open-source Flutter app for reading manga, novels, and watching animes across multiple platforms.
Features
Features include:
- Reading manga, webtoons, comics, novels, animes, movies, and more.
- Local reading of content.
- A configurable reader with multiple viewers, reading directions and other settings.
- Tracker support for anime and manga: MyAnimeList, AniList, SIMKL, trakt and Kitsu support.
- Categories to organize your library.
- Light and dark themes.
- Create backups locally to read offline or to your desired cloud service.
Download
Get the app from our releases page.
iOS Sideloading Sources
Note: Only future releases (> 0.5.2) will be signed (and therefore have AltStore/SideStore compatibility).
Contributing
Contributions are welcome!
To get started with extension development, see CONTRIBUTING-DART.md for create sources in Dart or CONTRIBUTING-JS.md for create sources in JavaScript.
Using flutter_rust_bridge
To run and build this app, you need to have Flutter SDK and Rust toolchain installed on your system. You can check that your system is ready with the commands below. Note that all the Flutter subcomponents should be installed.
rustc --version
flutter doctor
You also need to have the CLI tool for flutter_rust_bridge ready.
cargo install 'flutter_rust_bridge_codegen'
run the following command:
flutter_rust_bridge_codegen generate
Now you can run and build this app just like any other Flutter projects.
flutter run
License
Copyright 2023 Moustapha Kodjo Amadou
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Disclaimer
Mangayomi is not hosting any kind of content and the developer(s) of this application does not have any affiliation with the content providers that are freely available in the internet.



