Skip to content

Conversation

@dennis-tseng99
Copy link
Contributor

In original sbat.c:

else if (preserve_sbat_uefi_variable(sbat, sbatsize, attributes,
	                             sbat_var_candidate) &&
	 !reset_sbat) {

The time omplexity of preserve_sbat_uefi_variable() is higher than reset_sbat. Maybe we could swap both of them to calculate reset_sbat first. Such that the shortcut performance can be improved.

In original sbat.c:
...
else if (preserve_sbat_uefi_variable(sbat, sbatsize, attributes,
	                             sbat_var_candidate) &&
	 !reset_sbat) {
...

The time omplexity of preserve_sbat_uefi_variable() is higher than
reset_sbat. Maybe we could swap both of them to calculate reset_sbat
first. Such that the shortcut performance can be improved.

Signed-off-by: Dennis Tseng <dennis.tseng@suse.com>
@vathpela vathpela merged commit 0345331 into rhboot:main Jan 15, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants