NetworkManager/src/core/settings
Thomas Haller 877d2b236f
core: avoid checking sort order for cached settings list
We now have a cached list of NMSettingsConnection instances,
sorted by their autoconnect priority.

However, the sort order nm_settings_connection_cmp_autoconnect_priority()
depends on various properties of the connection:

 - "connection.autoconnect" and "connection.autoconnect-priority"
 - the timestamp
 - "connection.uuid"

These properties almost never change, so it's a waste that every call
to nm_settings_get_connections_sorted_by_autoconnect_priority() needs
to check whether the sort order is still satisfied.

We can do better by tracking when the sort order might have been
destroyed and only check in those (much fewer) cases.

Note that we end up calling nm_settings_get_connections_sorted_by_autoconnect_priority()
a lot, so this makes a difference.
2021-06-18 11:20:30 +02:00
..
plugins all: use nm_uuid_is_normalized() for checking valid UUID for "connection.uuid" 2021-06-04 09:29:23 +02:00
nm-agent-manager.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-agent-manager.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-secret-agent.c all: Replace deprecated NM_CONNECTION_SERIALIZE_* flags 2021-04-01 17:19:15 +02:00
nm-secret-agent.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-settings-connection.c core: avoid checking sort order for cached settings list 2021-06-18 11:20:30 +02:00
nm-settings-connection.h core: add nm_settings_connection_cmp_autoconnect_priority_with_data() helper 2021-06-17 17:48:13 +02:00
nm-settings-plugin.c build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-settings-plugin.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-settings-storage.c all: use nm_uuid_is_normalized() for checking valid UUID for "connection.uuid" 2021-06-04 09:29:23 +02:00
nm-settings-storage.h glib-aux: change nm_uuid_is_valid_full() to nm_uuid_is_normalized_full() 2021-06-04 09:29:22 +02:00
nm-settings-utils.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-settings-utils.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-settings.c core: avoid checking sort order for cached settings list 2021-06-18 11:20:30 +02:00
nm-settings.h core: avoid checking sort order for cached settings list 2021-06-18 11:20:30 +02:00