Skip to content

Commit

Permalink
perf: improve indexing speed by 38%~
Browse files Browse the repository at this point in the history
this comes by dropping isolate, eliminating the need to serialize/deserialize data, reducing overhead & resulting in a more stable extraction
  • Loading branch information
MSOB7YY committed Nov 17, 2023
1 parent e6886da commit 6e445ed
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 289 deletions.
2 changes: 1 addition & 1 deletion lib/controller/edit_delete_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class EditDeleteController {
final saveDir = await Directory(AppDirs.SAVED_ARTWORKS).create();
final saveDirPath = saveDir.path;
final newPath = "$saveDirPath${Platform.pathSeparator}${track.filenameWOExt}.png";
final imgFiles = await Indexer.inst.extractOneArtwork(
final imgFiles = await Indexer.inst.extractTracksArtworks(
[track.path],
albumIdendifiers: {track.path: track.albumIdentifier},
);
Expand Down
2 changes: 1 addition & 1 deletion lib/controller/ffmpeg_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class NamidaFFMPEG {
currentFailed++;
} else {
final file = await Indexer.inst
.extractOneArtwork(
.extractTracksArtworks(
[filee.path],
forceReExtract: true,
artworkPaths: {filee.path: cachedThumbnail.path},
Expand Down
Loading

0 comments on commit 6e445ed

Please sign in to comment.