mysql / mysql-js

NoSQL node.js connector for MySQL Cluster
169 stars 46 forks source link

Deoptimizations in NDB SPI #11

Open jdduncan opened 10 years ago

jdduncan commented 10 years ago

From node --trace_deopt jscrund --adapter=ndb --spi we see a list of deoptimizations in NDB SPI code:

For Indy:

For Each:

For bulk:

jdduncan commented 10 years ago

http://floitsch.blogspot.com/2012/03/optimizing-for-v8-inlining.html http://mrale.ph/blog/2011/12/18/v8-optimization-checklist.html

jdduncan commented 10 years ago

DBOperation: In persist(), we call DBOperation with valid tableHandler and null indexHandler. Then we come to find(), where we have a valid indexHandler and null tableHandler. This triggers the deopt. But after this DBOperation() is not deoptimized again.

getFields(): called from NdbOperation with a variety of signatures.

getMappedFieldCount(): deoptimized 3 times. One point is that "this" could be a DBTableHandler or a DBIndexHandler.

getColumnMetadata(): deoptimized 3 times. Again, "this" could be DBIndexHandler or DBTableHandler.