Conversation
…formance improvements This also fixes that the clipboard is never deleated and grows infinite. There is also MemoryOptimizedClipboard but that has most likely worse performance.
tintinkung
left a comment
There was a problem hiding this comment.
Should we optimize the uses of these clipboards instead?
Our schematic file #getInitialSchematicBytes is compressed but reading it to a clipboard can be pretty large:
- 3+ million blocks by default 50 blocks environment radius
- On disk, FAWE read ALL blocks data and optimize it per 2 byte character
- It kinda does the same in memory as a byte array (correct me if not)
- Even in CPU optimized, that block data need to be allocated somewhere right?
- thats 6+ million bytes ~6MB each clipboard
- It make sense for pasting the plot world initially, but for getting metadata like its region? meh
Also hardcoding it in memory kinda defeat the purpose of FAWE clipboard config?
Yea that's the case afaik. What's your suggestion for that? I agree, especially because it seems like we are not caching the plot. So that's just unnecessary calls. I think it would be fine when pasting also extract all the metadata we need for various things and cache that. Would need some big works trough.
At least in my testing the fawe config have not an effect at all (at least the delete-after-days). Generally it's not fine graded and doesn't do that what the users expect imo. I also don't see any use of saving the Clipboard to the disc itself, at least in the ps current implementation. |
tintinkung
left a comment
There was a problem hiding this comment.
I cant replicate delete-after-days not working, but i guess it works if disk clipboard and others is consider useless
Replace Clipboard with CPUOptimizedClipboard for peformance improvements
This also fixes that the clipboard is never deleated and grows infinite. There is also MemoryOptimizedClipboard but that has most likely worse performance.