Todo "dpid_idle_timeout variable to dpidrc" and config parsing generally

James C <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <CACZ9Q6j1Bf5Uf_qrOkYsW9ciCHq4VsXqtjhPWxaykn8YshehDQ@mail.gmail.com>
Hello all,

In dpid/dpid.c at about line 204, there is a todo, that
dpid_idle_timeout should be configurable.

I looked at how to do this sympathetically with the existing code and
blocked, because the configuration file is:
- having its location calculated
- being opened
- being scanned into heap memory
several times in the existing code.

My over-response is to write a library to:
- private memory-map it
- parse it into a linked-list in the comments in the file
and
- have everyone who traversed the file now traverse the linked-list

On the way, we get new functionality:
- the ability to record the use of a configuration item
- the ability to report on unused configuration items
-- which are interesting because they're probably typos

Parsing dillorc with the default options uncommented, this approach is
about 4* faster than the existing approach.  I think that it will also
have a smaller VM footprint, because we are already paying for cooked
disk buffers for the same amount of file, more times.

The diff is 1400 lines, so I don't expect instant rejoicing :-)

The attached file contains my test-cases, shell scripts to generate
some of them, that are tricky, and the diff which inserts the code
into revision b185e43.

Regards,
James.

_______________________________________________
Dillo-dev mailing list
[email protected]
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
parse_01.tar.gz (application/x-gzip, 17.7 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.