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

Improve AceBase support #4557

Merged
merged 4 commits into from Oct 23, 2022
Merged

Conversation

appy-one
Copy link
Contributor

Hi @Ylianst I've taken the liberty to improve the AceBase implementation in MeshCentral. I have not tested the changes yet, will do so asap.

I have also taken a look at why you were seeing slow performance on your remove queries, I will be releasing a new version of AceBase tomorrow that will drastically improve this. Will keep you updated on this.

If there are other issues you would want to bring to my attention, please do so. I'm happy to help.

* use `.child` instead of string concats on paths
* remove unnecessary `limit(999999)` for queries with filters
* use `.get` instead of `.query` to get all data
* using `skip` and `limit` args of `GetAllTypeNoTypeFieldMeshFiltered`
* use `==` instead of `in` operator in `RemoveSMBIOS` and `GetSMBIOS`
* use `.count` insetad of `.get` in `getDbStats`
* use `.get` instead of `.query` in `getPlugins`, custom sort function
@lgtm-com
Copy link

lgtm-com bot commented Sep 16, 2022

This pull request introduces 1 alert and fixes 2 when merging 883f9ff into b51108a - view on LGTM.com

new alerts:

  • 1 for Syntax error

fixed alerts:

  • 1 for Useless conditional
  • 1 for Unused variable, import, function or class

@appy-one
Copy link
Contributor Author

I've just published AceBase v1.24.4 which should drastically improve query and remove performance

@Ylianst
Copy link
Owner

Ylianst commented Sep 17, 2022

Oh wow! Thank you!!! I don't know of anyone running MeshCentral in any real way using AceBase, so this is the perfect time to make these improvements. Given that the AceBase code in MeshCentral is isolated from the rest, I will gladly merge this in even if it's not perfect.

Thank you for looking into the record delete issue. I would have a good sized database with lots of events and change the configuration of MeshCentral to only keep events for a few minutes forcing the removal of lots of older events, that would jam up MeshCentral and did cause me to pause on using AceBase.

Looking at your changes, the typo in "MeshCentral" for the indexes caused me to hit my head a few times, well done.

I am on vacation until October 18th, but anytime you feel you want me to merge, let me know, I will gladly do it.

@Ylianst Ylianst marked this pull request as ready for review October 23, 2022 00:32
@Ylianst Ylianst merged commit 794c5aa into Ylianst:master Oct 23, 2022
@appy-one appy-one deleted the improve-acebase-support branch October 25, 2022 07:14
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.

None yet

2 participants