[Users] Search for messages between timestamps

Colin Leroy colin at colino.net
Thu Aug 23 09:22:23 CEST 2018


On Wed, 22 Aug 2018 18:09:06 +0300, Removed GDPR <removed-gdpr at example.com>
wrote:

> 2. It is quite slow. I am testing on a local (MH)
> folder with 491 messages (4.04Mb) and it takes 25
> seconds show the result consisting of 86 messages
> (639Kb).

`date` is more complicated than it seems, it opens multiple files:

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3

It parses, at least /etc/localtime, for timezones.

This script calls `date` three times, in a shell that itself reads
and parses things (like .profile) etc.

I don't have a solution, that's just an explanation.
-- 
Colin



More information about the Users mailing list