php / pecl-system-dio Goto Github PK
View Code? Open in Web Editor NEWDirect I/O functions
Home Page: https://pecl.php.net/package/dio
License: Other
Direct I/O functions
Home Page: https://pecl.php.net/package/dio
License: Other
Just built php_dio using manual here https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
We need PHP 8.2 DLL here https://windows.php.net/downloads/pecl/releases/dio/0.2.1/ as almost year passed since 8.2 release date.
If it's take time to rebuild it manually please consider using Github automation https://github.com/cmb69/setup-php-sdk which can build multiple releases, including upcoming 8.3.
Hi, I've been testing out various IO options for an application that needs a very high IO throughput.
When testing the DIO functions, I keep getting an error saying I've run out of memory after calling dio_read() multiple times.
Test code
`<?php
#Create a 10KB file
file_put_contents(DIR.'/dio-test-file', str_repeat('0', 10 * 1024));
$hFile = dio_open(DIR.'/dio-test-file', O_RDONLY);
while(true){
#Go back to the start of the file
dio_seek($hFile, 0);
#Read some data
$data = dio_read($hFile, 10000);
}
?>`
I would expect the test code above to sit in the loop reading the first 10,000 bytes from the file over and over until the script is killed.
Instead, the script exits almost immediately with the following error
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes) in /dio-test.php on line 13
While there are source code directories for php5 and php7, there is none for php8, so the package cannot be build for recent PHP versions. If there are no plans to support this, it might be a good idea to add the info to package.xml, so users get clearer information why they won't be able to build.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.