Passes values by reference when sorting to reduce memory copying. The
main saving on this is preventing copying of the large vector of files
getting passed into the `sort` function and then copying each item in
the vector in the for. This results in about a 27% performance gain
reducing the full benchmark of the kubernetes benchmark by 7.89 sec
Before
| Name | Total | Average | Min | Max |
| ---------------------------- | ------------- | ------------- | ------------- | ------------- |
| ivy_match(file.lua) 1000000x | 02.351614 (s) | 00.000002 (s) | 00.000002 (s) | 00.000042 (s) |
| ivy_files(kubernetes) 100x | 32.704256 (s) | 00.327043 (s) | 00.289397 (s) | 00.344413 (s) |
After
| Name | Total | Average | Min | Max |
| ---------------------------- | ------------- | ------------- | ------------- | ------------- |
| ivy_match(file.lua) 1000000x | 02.353386 (s) | 00.000002 (s) | 00.000002 (s) | 00.000049 (s) |
| ivy_files(kubernetes) 100x | 24.809576 (s) | 00.248096 (s) | 00.203167 (s) | 00.270263 (s) |
Now you can use `before` `before_each` `after` and `after_each`. Each of
the hooks will run in the context of the test file.
`before` This will run once before all the tests
`before_each` This will run before each of the test functions
`after` Will run once after all the test functions
`after_each` Will run after each one of the test functions
Multiple functions can be defined for each hook by calling the
respective function again.
Now the prompt will act like the default bash readline with emacs key
bindings, clear and delete word.
You can now also move left and right in the prompt to insert chars in
the middle of the prompt rather than having to delete your search term
and start again.
This will allow you to get the buffer the user was on when they invoked
an ivy command. This buffer is called the `origin` and you can access it
with `vim.ivy.origin()`.
Large projects can take a long time for the initial scan. This adds some
loading text until the initial selection has completed.
This will also now schedule the work to collect and sort the candidates
to ensure the UI is rendered before with work begins and creates a
hanging user experience.