App Engine deserializing records in python: is it really this slow? -
in profiling python2.7 app engine app, find it's taking average of 7ms per record deserialize records fetched ndb python objects. (in pb_to_query_result
, pb_to_entity
, descendants—this not include rpc time query database , receive raw records.)
is expected? model has 6 properties, 1 of localstructuredproperty
15 properties, includes repeated structuredproperty
4 properties, average object should have less 30 properties told, think.
is expected slow? want fetch couple of thousand records simple aggregate analysis, , while can tolerate amount of latency, on 10 seconds problem. there can restructure models or schema make more viable? (other obvious solution of pre-calculating aggregate analysis on regular basis , caching results.)
if it's unusual slow, helpful know can go , might doing impairs it.
short answer: yes.
i find deserialization in python slow, repeated properties involved. apparently, gae-python deserialization creates boatloads of objects. it's known inefficient, apparently, no 1 wants touch because it's far down stack.
it's unfortunate. run f4 front ends of time due overhead (i.e., faster cpu == faster deserialization).
Comments
Post a Comment