-
Notifications
You must be signed in to change notification settings - Fork 5
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
Decrease RAM requirements #88
Comments
Possibility: use a relational database |
Another possible consideration: binary serialization and caching. A relational database makes a lot of sense. I'll have to rework how I do "expensive" queries but that's OK. |
Thoughts on relational database:
Task<IEnumerable<TResult>> QuerySummaryAsync<TResult>(Func<System.Linq.IQueryable<ScoreboardSummaryEntry>, System.Linq.IQueryable<TResult>> executeQuery);
Task<IEnumerable<TResult>> QueryDetailsAsync<TResult>(Func<System.Linq.IQueryable<ScoreboardDetails>, System.Linq.IQueryable<TResult>> executeQuery); This way we can hopefully get the benefits of an IQueryable against a database while abstracting away the async call (which is not in the BCL but is ORM-dependent), and this should work against our existing score provider infrastructure. Assuming this actually works, the biggest issue I can think of is handling aggregate queries. I think the async aggregate calls in EF Core are in EF Core (i.e. not BCL), and I'd rather not have this interface dependent on EF Core. This leaves a few options:
Task<int> QueryDetailsMeanAsync<TResult>(Func<System.Linq.IQueryable<ScoreboardDetails>, System.Linq.IQueryable<int>> selectorQuery);
Task<int> QueryDetailsSumAsync<TResult>(Func<System.Linq.IQueryable<ScoreboardDetails>, System.Linq.IQueryable<int>> selectorQuery);
Task<double> QueryDetailsMeanAsync<TResult>(Func<System.Linq.IQueryable<ScoreboardDetails>, System.Linq.IQueryable<double>> selectorQuery);
Task<double> QueryDetailsSumAsync<TResult>(Func<System.Linq.IQueryable<ScoreboardDetails>, System.Linq.IQueryable<double>> selectorQuery);
// etc I think this would get out of hand.
|
Score data is very redundant in RAM. We should work on reducing the bot's RAM usage through various means, including improving this.
The text was updated successfully, but these errors were encountered: