Follow-up Comment #1, patch #5940 (project mldonkey):

Another approach, based on geoip.dat file mmap()ing:
ftp://ftp.berlios.de/pub/mldonkey/pango/geoip_rewrite_and_caching_v4.patch
The virtual memory size of the process will grow by geoip.dat size, but the
overall memory usage is the same (without that patch, the file is mapped in
filesystem's page cache instead). The benefit of the patch is to replace a
lots of syscalls (probably around 20 seek() and 20 read() per lookup) by few
page faults, when a required page needs to be loaded).

The two can be combined, but I don't know if it's worth it.

The patch is not minimal, the mmap() feature is just provided by the use of
Bigarray.Array1.map_file; But I also rewrote geoip.ml to give in a more
"ocaml-ish" style.


(file #12821)
    _______________________________________________________

Additional Item Attachment:

File name: geoip_rewrite_and_caching_v4.patch Size:29 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5940>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
Mldonkey-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/mldonkey-users

Reply via email to