Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #18856
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: poor performance while processing a file one byte a time |
| Date | 2022-01-20 20:27 +0100 |
| Message-ID | <j4trd2F1p5dU1@mid.individual.net> (permalink) |
| References | <ssbqrm$46r$1@gioia.aioe.org> <j4tnljF135hU1@mid.individual.net> <sscak4$kme$1@gioia.aioe.org> |
Mateusz Viste: > On Thu, 20 Jan 2022 19:23:49 +0100 > Arno Welzel <usenet@arnowelzel.de> wrote: [...] >> However this may still be quite slow on larger files. Since it seems >> you want to create some kind of checksum based on the file content, >> you may want to use something else like hash_file(), sha1_file() or >> md5_file() and use the result of these calls instead processing the >> whole file content in a loop. > > Sadly, that won't work. The kind of checksum I am computing is not > supported by PHP, hence why I do it byte by byte myself. Another > solution is to do it with my C code by system()-calling it from PHP, > but that's really ugly. At this point I'd rather stick with a slow, 100% > PHP solution. Or you create your own PHP extension which can then be used in the script ;-) -- Arno Welzel https://arnowelzel.de
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 15:16 +0100
Re: poor performance while processing a file one byte a time John-Paul Stewart <jpstewart@personalprojects.net> - 2022-01-20 11:08 -0500
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 17:23 +0100
Re: poor performance while processing a file one byte a time John-Paul Stewart <jpstewart@personalprojects.net> - 2022-01-20 12:38 -0500
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 19:49 +0100
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 17:37 +0100
Re: poor performance while processing a file one byte a time John-Paul Stewart <jpstewart@personalprojects.net> - 2022-01-20 12:41 -0500
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 19:47 +0100
Re: poor performance while processing a file one byte a time Arno Welzel <usenet@arnowelzel.de> - 2022-01-20 19:23 +0100
Re: poor performance while processing a file one byte a time Mateusz Viste <mateusz@xyz.invalid> - 2022-01-20 19:45 +0100
Re: poor performance while processing a file one byte a time Arno Welzel <usenet@arnowelzel.de> - 2022-01-20 20:27 +0100
csiph-web