Problem/Motivation
When an entity is inserted, updated or deleted, all operations related to links are performed inside the request. They can be expensive and there's no good reason the links generation should be performed while the client waits for the response. We don't need those links instantly. Moreover, creating entities inside the transaction (of node save, for instance) leads potentially to complications.
Proposed resolution
Move the operations in after the response has been sent to the client, in Kernel terminate phase.
Remaining tasks
None.
User interface changes
None.
API changes
Two services to implement DestructableInterface.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | benchmark.diff | 2.79 KB | claudiu.cristea |
Issue fork linkchecker-3622264
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
claudiu.cristeaComment #4
claudiu.cristeaBenchmark
I've created the attached function test to run some benchmarks. The test simply outputs the time consumed with saving a node with a lot of links. I've exaggerated the number of links just to make my point but even with some decent numbers the gain is obvious. I've run the test 5 times against 2.1.x and against the MRs branch. Here are my results:
Comment #5
claudiu.cristeaComment #6
claudiu.cristeaComment #7
dimilias commentedSeems to be working nice. RTBC + 1