Git Product home page Git Product logo

Comments (6)

jevexendo avatar jevexendo commented on June 11, 2024

One thing I would like to note is that there are potential benefits to isolating plugins between world instances. For instance, if you have a project that uses plugins X and Y but is incompatible with Z and another world which uses plugin Z, then the process isolation actually works out quite nicely.

from amulet-editor.

gentlegiantJGC avatar gentlegiantJGC commented on June 11, 2024

That is a good point. I haven't really thought about how to manage non-global plugins.

from amulet-editor.

jevexendo avatar jevexendo commented on June 11, 2024

I would agree in that the lack of shared memory could be troublesome to work with when trying to copy a selection between worlds, but in order to solve that problem, I think it could be reasonable to just export the selection as a schematic in a global clipboard folder.

Perhaps we wouldn't want to apply that logic to all copy operations since I'd imagine it's non-trivially slower than just keeping the selection in RAM, but I feel like this is the only major disadvantage of the one world per instance method and it feels like there should be a reasonable solution.

from amulet-editor.

Podshot avatar Podshot commented on June 11, 2024

I like the one process per world approach, while the separate memory disadvantage is a big factor we can at least kinda workaround that while the GIL is out of our reach and a more complex system for world based variables might be tricky to implement depending on how we approach it. I also agree with Jevex that there are some good benefits from isolating plugins into each world instance, we could probably add in a system down the line to help plugins transfer data between world instances if needed.

from amulet-editor.

gentlegiantJGC avatar gentlegiantJGC commented on June 11, 2024

I would need to experiment to find the optimal solution. We either:

  1. Save all copied regions to a temporary directory on disk where any process can read them. This could be slower for users with slow HDDs.
  2. Save all copied regions in RAM and use IPC to send the data between processes as required.
  3. Save all copied regions in RAM and push to disk only when another process requires it.

2 is probably the best solution and would allow us to stream data on a chunk basis rather than having to serialise the whole area which may be very large.

I haven't really done IPC before but I can look into it.

from amulet-editor.

gentlegiantJGC avatar gentlegiantJGC commented on June 11, 2024

I think the scope of this question has been answered. I will open new tickets for future questions.

from amulet-editor.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.