Skip to content

flutter_isolate does not actually spawn isolates since 2.1.0 #160

@srmncnk

Description

@srmncnk

What it says in the title.

The problematic commit

While using FlutterEngineGroup is a great idea in terms of memory consumption and sharing complex objects, it actually does not run in separate threads. I checked this by running this via ffi:

int64_t get_thread_id() {
  return (int64_t)syscall(SYS_gettid);
}

And it returned the same number for all the isolates spawned by flutter_isolate. For version 2.0.4 (which did not use FlutterEngineGroup yet), every thread id is a different number.

This is a bug and it should be addressed this way - behaviour in heavy-lifting apps drastically changes when doing a seemingly harmless upgrade from 2.0.4 to 2.10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions