Reduce worker_manager memory allocation (#4435)

This commit is contained in:
Dat Dang
2026-04-09 18:26:19 +07:00
committed by GitHub
parent dd77b2d53a
commit 61530b61c6
22 changed files with 229 additions and 281 deletions
@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/state/success.dart';
@@ -172,7 +173,7 @@ class MailboxDataSourceImpl extends MailboxDataSource {
StreamController<dartz.Either<Failure, Success>>? onProgressController,
}) {
return Future.sync(() async {
if (PlatformInfo.isWeb) {
if (PlatformInfo.isWeb || Platform.numberOfProcessors == 1) {
return await mailboxAPI.moveFolderContent(
session: session,
accountId: accountId,