{"id":18058210,"url":"https://github.com/cosmoverse/fasterchest","last_synced_at":"2025-04-11T08:20:15.882Z","repository":{"id":260359128,"uuid":"871305162","full_name":"Cosmoverse/FasterChest","owner":"Cosmoverse","description":"Speed up PocketMine world loads and saves in worlds densely populated with chests.","archived":false,"fork":false,"pushed_at":"2024-10-30T21:50:50.000Z","size":2840,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:51:14.071Z","etag":null,"topics":["optimization","performance","plugin","pmmp","pmmp-plugin","pocketmine-mp","world"],"latest_commit_sha":null,"homepage":"https://poggit.pmmp.io/ci/Cosmoverse/FasterChest","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cosmoverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-11T17:15:48.000Z","updated_at":"2025-03-14T23:49:59.000Z","dependencies_parsed_at":"2024-10-30T22:40:09.589Z","dependency_job_id":null,"html_url":"https://github.com/Cosmoverse/FasterChest","commit_stats":null,"previous_names":["cosmoverse/fasterchest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosmoverse%2FFasterChest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosmoverse%2FFasterChest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosmoverse%2FFasterChest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cosmoverse%2FFasterChest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cosmoverse","download_url":"https://codeload.github.com/Cosmoverse/FasterChest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248360839,"owners_count":21090768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["optimization","performance","plugin","pmmp","pmmp-plugin","pocketmine-mp","world"],"created_at":"2024-10-31T03:05:37.475Z","updated_at":"2025-04-11T08:20:15.861Z","avatar_url":"https://github.com/Cosmoverse.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FasterChest\nSpeed up world loads and world saves in worlds densely populated with chests.\n\n### What's the Problem?\nSurvival-like game-servers (including factions and skyblock) generally consist of \"team bases\" that have\ntons of chests. PocketMine follows Mojang's world format which performs terribly on these servers—a change\nin one chest requires serializing all chests within the chunk, and 1 chest cannot be read in a chunk\nwithout deserializing all chests in the chunk.\nThe performance impact that Mojang's default world format has makes it impractical to host survival-like\nservers especially when there's a lot of action happening simultaneously (like PvP, events, etc.).\n![](readme-resources/a-lot-of-chests.png)\n\n### How FasterChest Works?\nFasterChest stores items in chest outside (i.e., separately from) the `worlds` folder in a `chest.db` file\nthat maps each chest coordinate to their inventory. This means chests are stored individually (rather than\naltogether as one serialized entry—which is what Mojang does). This allows chests to be loaded only when\nneeded (such as when a player accesses the chest, or an explosion drops chest inventory). A chest that hasn't\nbeen accessed during previous and current world-save is neither read nor written.\n\nhttps://github.com/user-attachments/assets/579b13f9-4f34-43bd-b4c0-79d8b84a11f4\n\n_\u003cp align=\"center\"\u003ePocketMine's default world load performance (left) vs. with FasterChest (right) for a world consisting of\na chunk with 4096 fully-filled chests containing custom-named items with 5 enchantments\u003c/p\u003e_\n\n### How to Use FasterChest?\n**A world backup is recommended before using this plugin.**\nInstall the plugin on your server. All \u003cins\u003enewly-placed chests\u003c/ins\u003e will use a `FasterChest` tile in place of\nvanilla chest tiles. This new tile is indistinguishable from chest tiles to players.\n\n**What about existing chests?** Run `/save-all` then `/fasterchest convert \u003cworld\u003e` to convert all existing\nchests in a  specific world to `FasterChest` tile. This process can take a while depending on how many chunks\n(and how many chests) are in your world.\n\n**What if I do not want to use the plugin anymore?** Run `/save-all` then `/fasterchest revert \u003cworld\u003e` for all\nworlds on your server. This will revert all `FasterChest` tiles to vanilla tiles. Running this command is necessary\nif you choose to uninstall the plugin (otherwise you risk corrupting chests in your world).\n\n### When FasterChest Does Not Cut It\nServers that utilize plugins that automatically scan and modify many chests frequently will notice lesser performance\ngain from FasterChest. Being strategic with reads and conservative with writes can however help reduce deserialization\nor serialization costs (or both!).\n\n### Developer Docs\nProgramatically convert and revert chest tiles in a world using `Loader::convertWorld()` and `Loader::revertWorld()`\nasynchronous methods.\n```php\n/** @var Loader $loader */\n$loader = $this-\u003egetServer()-\u003egetPluginManager()-\u003egetPlugin(\"FasterChest\");\n$world = $this-\u003egetServer()-\u003egetWorldManager()-\u003egetDefaultWorld();\nAwait::f2c(function() use($loader) : Generator{\n\t$world-\u003esaveChunks(); // converters read some tile NBT from disk\n\t$conversions = yield from $loader-\u003econvertWorld($world);\n\techo \"Converted \", $conversions, \" chest(s) to FasterChest\";\n\n\t$world-\u003esaveChunks();\n\t$reversions = yield from $loader-\u003erevertWorld($world);\n\techo \"Reverted \", $reversions, \" chest(s) to vanilla chest\";\n});\n```\n\n`FasterChest` lets you specify a custom serialization mechanism for chest items if you so wish to. Switch from\nthe default serializer to a custom inventory serializer by creating your own `FasterChestSerializer` instance and\nassigning it to `FasterChest::$serializer` during your plugin's `onLoad()`.\n```php\nFasterChest::$serializer = new MyFasterChestSerializer();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmoverse%2Ffasterchest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmoverse%2Ffasterchest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmoverse%2Ffasterchest/lists"}