mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-08 02:34:20 +01:00
Merge 'io/linux: make syscallio the default (io_uring is really slow)' from Jussi Saurio
context: https://github.com/tursodatabase/limbo/issues/1275 Reviewed-by: Pere Diaz Bou <pere-altea@homail.com> Closes #1295
This commit is contained in:
@@ -43,7 +43,7 @@ impl Default for Io {
|
||||
true => {
|
||||
#[cfg(all(target_os = "linux", feature = "io_uring"))]
|
||||
{
|
||||
Io::IoUring
|
||||
Io::Syscall // FIXME: make io_uring faster so it can be the default
|
||||
}
|
||||
#[cfg(any(
|
||||
not(target_os = "linux"),
|
||||
|
||||
@@ -89,12 +89,12 @@ impl Database {
|
||||
path: &str,
|
||||
vfs: &str,
|
||||
) -> crate::Result<(Arc<dyn IO>, Arc<Database>)> {
|
||||
use crate::{MemoryIO, PlatformIO};
|
||||
use crate::{MemoryIO, SyscallIO};
|
||||
use dynamic::get_vfs_modules;
|
||||
|
||||
let io: Arc<dyn IO> = match vfs {
|
||||
"memory" => Arc::new(MemoryIO::new()),
|
||||
"syscall" => Arc::new(PlatformIO::new()?),
|
||||
"syscall" => Arc::new(SyscallIO::new()?),
|
||||
#[cfg(all(target_os = "linux", feature = "io_uring"))]
|
||||
"io_uring" => Arc::new(UringIO::new()?),
|
||||
other => match get_vfs_modules().iter().find(|v| v.0 == vfs) {
|
||||
|
||||
@@ -190,7 +190,7 @@ cfg_block! {
|
||||
#[cfg(feature = "fs")]
|
||||
pub use unix::UnixIO;
|
||||
pub use unix::UnixIO as SyscallIO;
|
||||
pub use io_uring::UringIO as PlatformIO;
|
||||
pub use unix::UnixIO as PlatformIO;
|
||||
}
|
||||
|
||||
#[cfg(any(all(target_os = "linux",not(feature = "io_uring")), target_os = "macos"))] {
|
||||
|
||||
Reference in New Issue
Block a user