Table of Contents
Profiling Results
Introduction
We have a test dataset of ~1500 small objects (each with 5 to 15 integer, datetime or short string properties). They represent a dozen different classes which refer each other in a hierarchical structure. See attachments for some samples of profiling data for that dataset. Added by akaihola who works at ambitone.com
How to generate profiling data for KCacheGrind
To generate callgrind.out files from cProfile you need lsprofcalltree.py. Here is a small example:
from pyamf.amf3 import encode from cProfile import Profile from lsprofcalltree import KCacheGrind d = get_some_sufficiently_large_data_structure() prof = Profile().runctx('encode(d)', globals(), locals()) KCacheGrind(prof).output(file('/tmp/callgrind.out', 'w'))
Attachments
-
callgrind.out.encode-1500-objects-r1017
(17.6 kB) - added by akaihola
8 months ago.
over a million calls to cmp before the #198 patch
-
callgrind.out.encode-1500-objects-r1017-patch198
(16.1 kB) - added by akaihola
8 months ago.
same run after applying Nick's patch from #198
-
callgrind.out.encode-1500-objects-r1039.amf0
(15.9 kB) - added by akaihola
8 months ago.
profile of encoding 1500 objects with AMF0 before optimisations
-
callgrind.out.encode-1500-objects-r1055.amf0
(16.1 kB) - added by akaihola
8 months ago.
profile of encoding 1500 objects with AMF0 after optimisations
