Skip to content

[Perf] Base model and mmproj companion download sequentially instead of concurrently #71

Description

@ASahu16

Problem

DownloadService.downloadModel (lib/core/services/download_service.dart:90) downloads a multimodal model's base file and its mmproj companion file via two sequential await _downloadFile(...) calls instead of concurrently.

Failure scenario

Installing any vision-capable model (Gemma 4 E2B/E4B today, #22) makes the user wait for the sum of both transfer times instead of roughly the max of the two. Both progress-reporting closures and the shared cancel token appear safe to run concurrently (each downloads to its own file, and progress is already reported as a size-weighted average per docs/PROJECT.md).

Found during v1.2.0 release-readiness code review of the main...develop diff.

Fix direction

Kick off both downloads with Future.wait([...]) (or similar), combining progress callbacks, instead of two sequential awaits.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions