Skip to content

perf(Unzip): better unzip by using in memory unzip#1274

Merged
BotellaA merged 2 commits into
nextfrom
perf/unzip
May 18, 2026
Merged

perf(Unzip): better unzip by using in memory unzip#1274
BotellaA merged 2 commits into
nextfrom
perf/unzip

Conversation

@BotellaA
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 15 concern(s)
  • src/geode/basic/zip_file.cpp:30:10: error: [clang-diagnostic-error]

    'mz.h' file not found

       30 | #include <mz.h>
          |          ^~~~~~
  • src/geode/basic/zip_file.cpp:42:9: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'create_directory' of similar type ('std::string_view') are easily swapped by mistake

       42 |         std::string_view file, std::string_view temp_filename )
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:42:26: note: the first parameter in the range is 'file'
       42 |         std::string_view file, std::string_view temp_filename )
          |                          ^~~~
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:42:49: note: the last parameter in the range is 'temp_filename'
       42 |         std::string_view file, std::string_view temp_filename )
          |                                                 ^~~~~~~~~~~~~
  • src/geode/basic/zip_file.cpp:54:20: warning: [cppcoreguidelines-special-member-functions]

    class 'Impl' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

       54 |     class ZipFile::Impl
          |                    ^
  • src/geode/basic/zip_file.cpp:60:13: warning: [cppcoreguidelines-prefer-member-initializer]

    'writer_' should be initialized in a member initializer of the constructor

       57 |         Impl( std::string_view file, std::string_view archive_temp_filename )
          |                                                                              
          |                                                                               : writer_(mz_zip_writer_create())
       58 |         {
       59 |             directory_ = create_directory( file, archive_temp_filename );
       60 |             writer_ = mz_zip_writer_create();
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/basic/zip_file.cpp:75:17: warning: [readability-implicit-bool-conversion]

    implicit conversion 'void *' -> 'bool'

       75 |             if( writer_ )
          |                 ^
          |                         != nullptr
  • src/geode/basic/zip_file.cpp:106:9: warning: [modernize-use-nodiscard]

    function 'directory' should be marked [[nodiscard]]

      106 |         std::string directory() const
          |         ^
          |         [[nodiscard]] 
  • src/geode/basic/zip_file.cpp:140:22: warning: [cppcoreguidelines-special-member-functions]

    class 'Impl' defines a non-default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

      140 |     class UnzipFile::Impl
          |                      ^
  • src/geode/basic/zip_file.cpp:143:9: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: zip_data_

      143 |         Impl( std::string_view file, std::string_view unarchive_temp_filename )
          |         ^
  • src/geode/basic/zip_file.cpp:162:17: warning: [readability-implicit-bool-conversion]

    implicit conversion 'void *' -> 'bool'

      162 |             if( reader_ )
          |                 ^
          |                         != nullptr
  • src/geode/basic/zip_file.cpp:168:17: warning: [readability-implicit-bool-conversion]

    implicit conversion 'void *' -> 'bool'

      168 |             if( memory_stream_ )
          |                 ^
          |                                != nullptr
  • src/geode/basic/zip_file.cpp:179:41: warning: [bugprone-implicit-widening-of-multiplication-result]

    performing an implicit widening conversion to type 'const size_t' (aka 'const unsigned long') of a multiplication performed in type 'int'

      179 |             constexpr size_t BUF_SIZE = 1024 * 1024; // 1 MB
          |                                         ^
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:179:41: note: make conversion explicit to silence this warning
       24 |             constexpr size_t BUF_SIZE = 1024 * 1024; // 1 MB
          |                                         ^~~~~~~~~~~
          |                                         static_cast<const size_t>( )
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:179:41: note: perform multiplication in a wider type
      179 |             constexpr size_t BUF_SIZE = 1024 * 1024; // 1 MB
          |                                         ^~~~
          |                                         static_cast<long>( )
  • src/geode/basic/zip_file.cpp:194:22: warning: [readability-implicit-bool-conversion]

    implicit conversion 'FILE *' (aka '_IO_FILE *') -> 'bool'

      194 |                 if( !f )
          |                     ~^
          |                        == nullptr
  • src/geode/basic/zip_file.cpp:211:17: warning: [cert-err33-c]

    the value returned by this function should not be disregarded; neglecting it may lead to errors

      211 |                 fclose( f );
          |                 ^~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/basic/zip_file.cpp:211:17: note: cast the expression to void to silence this warning
  • src/geode/basic/zip_file.cpp:211:17: warning: [cppcoreguidelines-owning-memory]

    calling legacy resource function without passing a 'gsl::owner<>'

      211 |                 fclose( f );
          |                 ^~~~~~~~~~~
  • src/geode/basic/zip_file.cpp:216:9: warning: [modernize-use-nodiscard]

    function 'directory' should be marked [[nodiscard]]

      216 |         std::string directory() const
          |         ^
          |         [[nodiscard]] 

Have any feedback or feature suggestions? Share it here.

@BotellaA BotellaA merged commit 31cf187 into next May 18, 2026
20 checks passed
@BotellaA BotellaA deleted the perf/unzip branch May 18, 2026 19:41
@BotellaA
Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 17.0.2-rc.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants