-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Reimplement batching #316
Reimplement batching #316
Conversation
Fixes #310 |
@Piedone @deanmarcussen This should fix batching. |
|
This looks exactly what I thought it would look like. Great. And Sqlite too ;) Here's some numbers. Which lie on the remote numbers, because my internet connection to azure this morning is significantly slower than yesterday.
These are all for dummy indexes which never perform any writes. Just cause deletes. What I can see in the profiler is that everything easy to batch, is batched together. But the network is really slow this morning. So better to look at the local numbers where we can see it's dropped by 2/3 to a 1/2. Awesome |
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
I tried testing this with an existing Orchard Core app (version somewhere post-RC2) but it seems to be hopelessly incompatible so I'll just eagerly await this getting into Orchard :). |
There were a few breaking change with strongly typed things since OC rc2. |
PR is ready to merge. It now batches everything, including inserts and updates, for documents and indexes. I created another PR that will allow us to get rid of most unnecessary delete statements in OC: |
Does it make sense to test this or #318 with OC? |
I am merging both and we'll get a package on myget to test. |
I did a local setup with the myget feed and it works fine. When I create a blog post here are the only batch that is sent:
Then when I update the blog post:
Though I think there is something to optimize as I see an update right after and insert, on the same record. |
btw I use the mini profiler to see this. I update the font-end and it dumps all the queries that happened in the admin. I don't remember if we made an option to enable toe mini profiler in the admin too. |
My change on the filters is not working, it's actually breaking things, so don't try to use it for now. |
After new optimizations to merge the insert+update on the indexes:
|
After adding the filters on the indexes:
Layer and Alias are gone since it's not on the blog post. Example: context.For<AliasPartIndex>()
.When(c => c.Has<AliasPart>())
.Map(contentItem => |
Between 50% and 75% faster in OC under SQL Server 👍 Depends on the type of test And that's without the
Yes @Piedone added an option for this. |
No description provided.