Refactor #1930
Improve storeconfigs speed in the nothing changed case
| Status: | Closed | Start: | 02/04/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | Rails | |||
| Target version: | 0.25.0 | |||
| Affected version: | 0.24.7 | Branch: | ||
| Votes: | 0 |
Description
Here is a patch (against master) to improve storeconfigs speed.
The idea is that what takes time in the rails code right now is not the time taken to issue the SQL statements but the time to create all the Active Record rails object. The resource parameters and resource tags now issue directly SQL requests (still through rails, though) and gets back arrays of hash containing column values, instead of creating Active Records objects. The other benefit is the number of requests issued is now greatly decreased and not dependent anymore on the number of resources for a given host.
Facts: On a 562 resource node, with a mysql database: * 0.24.7: info: Stored catalog for corp2.daysofwonder.com in 4.05 seconds notice: Compiled catalog for corp2.daysofwonder.com in 6.31 seconds
- 0.24.7 with the patch: info: Stored catalog for corp2.daysofwonder.com in 1.39 seconds notice: Compiled catalog for corp2.daysofwonder.com in 3.80 seconds
Patch against master available here: http://github.com/masterzen/puppet/tree/features/storeconfigs-opt
Patch against 0.24.7, courtesy of Luke: http://github.com/lak/puppet/tree/features/0.24.7/storeconfigs-opt
History
Updated by James Turnbull over 1 year ago
- Status changed from Unreviewed to Accepted
- Assignee set to James Turnbull
Updated by James Turnbull over 1 year ago
- Status changed from Accepted to Closed
0.24.x commit:“f01882da6284d61312016d7de602af65da6d5731” in branch 0.24.x master commit:“361db45875768727d3c5f310c76850f350e6441f” in branch master