-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CR] Seamless loading of gzipped world/maps/x.y.z/x.y.z.map files #43986
Conversation
Not sure I will have time in the coming days to work more on this PR unfortunately. But I definitely want this feature and no one else seems to be available and interested simultaneosly. |
This reverts commit 8a2b0c1.
|
|
Of course it is up to @kevingranade but I'd strongly recommend against using submodules. In my experience they always cause more issues than they solve. For example, new people checking out the codebase have extra steps they need to take or things behave strangely. You already ran into a related issue in needing to alter the actions to checkout the submodules. There are so many little places where similar issues will arise; it's just not worth the trouble. |
In my opinion the issue is highly outweighed by the benefits of not forcing everyone to download the history of everything. Although it's quite late at this point I still think that this project could benefit from git submodules and I'm trying to establish a precedent. It's just an additional command or two to run that can save you g |
If you're trying to set a precedent for more extensive use for git submodules, stop now, that's not happening. I'm not clear what the mechanism would be for having people not download the entire project history. We can possibly shift out the tilesets, but even that would be a massive undertaking of rebasing the entire project history to remove them from the main repository, and nothing else is coming to mind that is optional for download. |
Since you asked, here are some of the annoyances from submodules I'm aware of:
|
ok, I'll just copy the files.
It's becoming off-topic and irrelevant here but just to explain my opinion, in the order of being suitable for offloading into submodules (more to less):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a bunch of changes that should make it compile / be a bit cleaner
Co-authored-by: Oleg Antipin <60584843+olanti-p@users.noreply.github.com>
Co-authored-by: Oleg Antipin <60584843+olanti-p@users.noreply.github.com>
Thank you! Let's see if I missed anything... |
Is it really a problem that was introduced by this PR? Is g++-7 build different in that it needs something like one of the configs in |
CMakeLists.txt
Outdated
@@ -369,6 +369,8 @@ IF(USE_HOME_DIR) | |||
ENDIF(USE_HOME_DIR) | |||
|
|||
add_subdirectory(src) | |||
add_executable(main src/main.cpp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't want to add a new executable like this; it needs to be made a dependency of the existing executables.
zlib is already a dependency of the binaries in TILES mode, so you can see how this is done (in src/CMakeLists.txt
, not this file) and mimic that. Will need something like
target_include_directories(cataclysm-common PUBLIC ${ZLIB_INCLUDE_DIRS})
target_link_libraries(cataclysm-common ${ZLIB_LIBRARIES})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not realizing there is a src/CMakeLists.txt
was my major problem until now, thank you!
Still |
|
|
I looked at the |
Superseded
by #44218
Summary
SUMMARY: Performance "Seamless loading of gzipped world/maps/x.y.z/x.y.z.map files"
Purpose of change
Ability to drastically reduce save folder sizes with (hopefully) only a marginal performance impact.
Describe the solution
Checking first two bytes of files before loading JSON and if they are compressed use
gzstream
instead ofstd::ifstream
to read them.Reference: kevingranade/Cataclysm@e751f0b
Testing
Additional context
#10784 #14307 #19192 #24916 #32530