0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-23 06:28:23 -05:00
Commit Graph

11 Commits

Author SHA1 Message Date
neon_arch
991f3f59de
perf: several optimizations for improving the performance of the engine (#540)
* ♻️ refactor: initialize & store the config & cache structs as a constant (#486)
- initializes & stores the config & cache structs as a static constant.
- Pass the config & cache structs as a static reference to all the
  functions handling their respective route.

*  perf: replace hashmaps with vectors for fetching & aggregating results (#486)
- replace hashmaps with vectors for fetching, collecting & aggregating results as it tends to be contigous & cache efficient data structure.
- refactor & redesign algorithms for fetching & aggregating results
  centered around vectors in aggregate function.

*  build: add the future crate (#486)

*  perf: use `futureunordered` for collecting results fetched from the tokio spawn tasks (#486)
- using the `futureunordered` instead of vector for collecting results
  reduces the time it takes to fetch the results as the results do not
  need to come in specific order so any result that gets fetched first
  gets collected in the `futureunordered` type.

Co-authored-by: Spencerjibz <spencernajib2@gmail.com>

*  perf: initialize new async connections parallely using tokio spawn tasks (#486)

*  perf: initialize redis pipeline struct once with the default size of 3 (#486)

*  perf: reduce branch predictions by reducing conditional code branches (#486)

*  test(unit): provide unit test for the `get_safesearch_level` function (#486)

*  perf: reduce clones & use index based loop to improve search results filtering performance (#486)

* 🚨 fix(clippy): make clippy/format checks happy (#486)

* 🚨 fix(build): make the cargo build check happy (#486)

*  perf: reduce the amount of clones, to_owneds & to_strings (#486)

*  perf: use async crates & methods & make functions async (#486)

* 🔖 chore(release): bump the app version (#486)

---------

Co-authored-by: Spencerjibz <spencernajib2@gmail.com>
2024-03-11 12:01:30 +03:00
Леонтий Вартанян
5020f36c90
♻️ refactor: standardize the content-type header by using an enum value over typing it manually (#474)
* ♻️  refactor: change content-type

* 🐛  fix: change parameters that were passed to the settings function

---------

Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>
2023-12-31 13:31:07 +03:00
neon_arch
d8943709c7 🚨 chore: make cargo format checks happy (#461) 2023-12-28 21:08:42 +03:00
neon_arch
93afb6b8c9
Merge branch 'rolling' into CHORE/461_display-the-user-provided-settings-from-the-config-or-the-ui-in-the-settings-page 2023-12-28 21:04:21 +03:00
neon_arch
26aa345f06 🚸 chore: pass the safe_search_level & upstream_search_engines as a hashmap in the settings view function (#461) 2023-12-28 19:58:18 +03:00
maokwen
43357493d5
🐛 fix: explicit Content-Type header for HTTP response (#457) 2023-12-27 11:24:44 +03:00
neon_arch
1a2a833597 feat: pass the new animation config option (#424) 2023-12-12 15:04:44 +03:00
víctor
5e2669b6de
♻️ Clean some code, fix bug (#396)
* ♻️ Improve src/handler

Removes unnecessary submoduling & adjusts some weird code

* ♻️ Cleaner code

* 🐛 Fixed issue where code would overflow if page=0
2023-11-27 09:45:28 +03:00
neon_arch
eee2f110b8 🚨 chore: make cargo clippy linter happy (#302) 2023-11-18 21:50:37 +03:00
neon_arch
64c4d2c23a ♻️ refactor(routes): serve new the maud files instead of handlebars files (#302) 2023-11-17 22:12:25 +03:00
neon_arch
493c56bd02 ⚙️ refactor: reorganize code & restructure codebase for better maintainability (#207) 2023-09-03 20:50:50 +03:00