bump libhaze version, multithread mtp transfers to maximise sd throughput (77MiB/s read, 40MiB/s write)
This commit is contained in:
@@ -165,7 +165,7 @@ FetchContent_Declare(ftpsrv
|
||||
|
||||
FetchContent_Declare(libhaze
|
||||
GIT_REPOSITORY https://github.com/ITotalJustice/libhaze.git
|
||||
GIT_TAG af69c0a
|
||||
GIT_TAG 1f11184
|
||||
)
|
||||
|
||||
FetchContent_Declare(libpulsar
|
||||
|
||||
@@ -153,19 +153,19 @@ struct FsProxy final : FsProxyBase {
|
||||
return f->GetSize(out_size);
|
||||
}
|
||||
Result SetFileSize(FsFile *file, s64 size) override {
|
||||
log_write("[HAZE] SetFileSize()\n");
|
||||
log_write("[HAZE] SetFileSize(%zd)\n", size);
|
||||
fs::File* f;
|
||||
std::memcpy(&f, &file->s, sizeof(f));
|
||||
return f->SetSize(size);
|
||||
}
|
||||
Result ReadFile(FsFile *file, s64 off, void *buf, u64 read_size, u32 option, u64 *out_bytes_read) override {
|
||||
log_write("[HAZE] ReadFile()\n");
|
||||
log_write("[HAZE] ReadFile(%zd, %zu)\n", off, read_size);
|
||||
fs::File* f;
|
||||
std::memcpy(&f, &file->s, sizeof(f));
|
||||
return f->Read(off, buf, read_size, option, out_bytes_read);
|
||||
}
|
||||
Result WriteFile(FsFile *file, s64 off, const void *buf, u64 write_size, u32 option) override {
|
||||
log_write("[HAZE] WriteFile()\n");
|
||||
log_write("[HAZE] WriteFile(%zd, %zu)\n", off, write_size);
|
||||
fs::File* f;
|
||||
std::memcpy(&f, &file->s, sizeof(f));
|
||||
return f->Write(off, buf, write_size, option);
|
||||
@@ -228,6 +228,9 @@ struct FsProxy final : FsProxyBase {
|
||||
}
|
||||
std::memset(d, 0, sizeof(*d));
|
||||
}
|
||||
virtual bool MultiThreadTransfer(s64 size, bool read) override {
|
||||
return !App::IsFileBaseEmummc();
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<fs::Fs> m_fs{};
|
||||
@@ -398,6 +401,9 @@ struct FsDevNullProxy final : FsProxyVfs {
|
||||
*out = 1024ULL * 1024ULL * 1024ULL * 256ULL;
|
||||
R_SUCCEED();
|
||||
}
|
||||
bool MultiThreadTransfer(s64 size, bool read) override {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
struct FsInstallProxy final : FsProxyVfs {
|
||||
@@ -518,6 +524,12 @@ struct FsInstallProxy final : FsProxyVfs {
|
||||
|
||||
FsProxyVfs::CloseFile(file);
|
||||
}
|
||||
|
||||
// installs are already multi-threaded via yati.
|
||||
bool MultiThreadTransfer(s64 size, bool read) override {
|
||||
App::IsFileBaseEmummc();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
::haze::FsEntries g_fs_entries{};
|
||||
|
||||
Reference in New Issue
Block a user