[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/servers/slapd entry.c



hyc@OpenLDAP.org wrote:

Update of /repo/OpenLDAP/pkg/ldap/servers/slapd

Modified Files:
	entry.c  1.131 -> 1.132

Log Message:
Added ldif_parse_line2 to parse in-place

While profiling a large (2 million entry) slapadd run we found that 43% of the total runtime was spent in str2entry, only 29% was being consumed by database operations (bdb_tool_entry_put). For those 2 million entries, str2entry called ch_free 198 million times. This patch reduced the malloc churn a fair bit, str2entry now only calls ch_free 70 million times, which resulted in saving about 12.5% of the total slapadd runtime. Now str2entry vs DB operations is only 34.8% vs 34.2% of the total runtime.

It still seems rather pathetic though. This is a large chunk of time, and it surely cannot be as complex a job as all of the rest of the backend + database work combined.

--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support