You can read the blog post on Lemmy (which is written in Rust).
You can comment here as well, I will do my best to answer any questions.
You can read the blog post on Lemmy (which is written in Rust).
You can comment here as well, I will do my best to answer any questions.
Another thing you could try to bring down your cargo check
time on diesel related code:
Box all queries as soon as possible. This will likely remove quite a bit of work for the type check part of rustc. So instead of for example:
users::table.filter(users::id.eq(42)).or_filter(users::name.eq("John"))
you would write
users::table.into_boxed().filter(users::id.eq(42)).or_filter(users::name.eq("John"))
Now this has not only advantages (otherwise it would be the default), so let me list potential disadvantages here:
Now all of this sounds like a large loose of performance. I've done some benchmarks some time back and while those effects where measurable in some cases (like using a in memory sqlite db) most of this should not really matter for queries that are not called repeatably in a hot loop.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.