innernet/hostsfile
Eva Pace de7ec99ad9
Optimize /etc/hosts writes (#259)
* hostsfile: change internal map from hash to btree

This change makes the innernet section of /etc/hosts always ordered and
deterministic. We can take advantage of that to avoid writes, that will
be done in another commit.

* hostsfile: reduce number of writes if content hasn't changed

* hostsfile: return bool to inform if file has been written

This commit also makes the logs print accordingly to the new behavior.

* hostsfile: remove has_content_changed in favor of comparing old and new sections

* hostsfile: print the correct hosts path in log message

* hostsfile: remove unnecessary intermediate variable
2023-06-02 08:42:54 +02:00
..
src Optimize /etc/hosts writes (#259) 2023-06-02 08:42:54 +02:00
Cargo.toml hostsfile: safely overwrite hosts file instead of clobbering (#186) 2022-01-22 16:24:44 +09:00