Skip to content

[warden sync] Allow creating multiple mutagen sync sessions per environment #910

@martin-cod

Description

@martin-cod

Version of Warden

0.15.0

Operating System and Installation Method

Mac OS 14.7 via Brew

Describe the Bug

I know mutagen sync performance topic has been discussed several times and some solutions to speedup syncing have been provieded already.

My specific usecase

On Magento 2 project every single file update on host machine takes around 30 sec to propogate changes to Docker container. After testing, I've found out the root cause: vendor folder.

Number of files:
find . | wc -l - 198894
find vendor/. | wc -l - 132128

Folder size:
du -sh . - 1.6G
du -sh vendor/. - 847M

When I added vendor to mutagen ignore list file sync has taken ~3 sec. But excluding vendor folder from syncing isn't what I want to have on a permanent basis. I need files in vendor folder be synced by mutagen. I don't need changes in vendor folder being synced as often as files in app/code folder. So it is fine if vendor folder syncing would be slower.

Solution

  • exclude vendor folder from the main mutagen sync session
  • create a separate mutagen sync session only for vendor folder

References

The same approach was applied in magento/magento-cloud-docker#100 (target file)

To Reproduce

No response

Expected Behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestup for grabsExtra attention is needed

    Projects

    Status

    🔖 Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions