Skip to content

Consider replacing the mutex in SyncSwitch with a read-write lock #102144

@ColdPaleLight

Description

@ColdPaleLight

SyncSwitch will be used for both frame rasterization on the Raster thread and texture upload on the IO thread.

But SyncSwitch uses std::mutex internally, which means only one thread can access it at a time. This poses a potential risk to the performance of raster threads.

It looks like we can fix this issue by replacing the mutex in SyncSwitch with a read-write lock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions