Hi Sergei, On Fri, May 08, 2015 at 07:01:11PM +0200, Sergei Golubchik wrote: > Hi, Sergey! > > On Apr 22, [email protected] wrote: > > revision-id: 7feee74dd30c96bd50d1c90e4ce3b06a656b17a5 > > parent(s): 696188fe2f0756a98914df5b95ba302f7e5c55df > > committer: Sergey Vojtovich > > branch nick: mariadb > > timestamp: 2015-04-22 13:29:56 +0400 > > message: > > > > MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO > > > > Added THD argument to select_result and all derivative classes. This > > reduces number of pthread_getspecific calls from 796 to 776 per OLTP > > RO transaction. > > Lots of changes for a little gain :) Gain is a bit undervalued here. This patch covers a lot more than OLTP RO. OLTP RO part is like 10% of it. :)
> Ok to push. > > An idea. Create a variant of Sql_alloc (say, Sql_alloc_explicit, a > parent of Sql_alloc) that does not use current_thd but requires MEM_ROOT > to be specified explicitly. And use it for classes where you want it. That's a very good idea. We should try to prevent further usage of Sql_alloc with implicit mem_root. But since I want explicit Sql_alloc basically everywhere I'd rather do it another way around: add Sql_alloc_implicit instead and use Sql_alloc in fixed code. :) Thanks, Sergey _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp

