Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance: future potential optimizations (once benchmarks exist) #46

Open
fritzrehde opened this issue Feb 5, 2023 · 2 comments
Open
Assignees

Comments

@fritzrehde
Copy link
Owner

in ui/state/lines.rs: AoS vs SoA (keep formatted and unformatted versions of line in struct of array or array of struct?)

@fritzrehde fritzrehde self-assigned this Feb 5, 2023
@fritzrehde
Copy link
Owner Author

Another optimization possibility: We currently have to check for every index in every line whether it is contained in the field selections (i.e. whether it should be displayed). This seems a little inefficient. Instead of having to iterate over every field, we could iterate over the field selections, which will always be less total iterations than iterating of all fields. For each selection/range, we keep only those in the specific range. This requires that we can iterate over the underlying Ranges implementation from an external crate (I think that isn't supported currently), and the ranges have to be sorted and non-overlapping.

@fritzrehde
Copy link
Owner Author

Another optimization possibility: Currently, I have mostly used Tokio's mutexes since they prevent deadlocks when used across await calls (i.e. the critical section enclosed by the mutex contains some async function call that is awaited). But async mutexes are less performant than regular ones, so maybe we should consider slightly re-designing the system so that we can use regular sync mutexes.

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

No branches or pull requests

1 participant