Re: [Modeling-users] entity import takes a lot of cpu
Status: Abandoned
Brought to you by:
sbigaret
From: Yannick G. <yan...@sa...> - 2003-02-19 19:08:28
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 19 February 2003 01:35 pm, Yannick Gingras wrote: > This delay is not showed in the python profiler so I assume that the time > is spent in a C module. Is the XML parser that CPU hungry ? Oups ! The delay clearly shows in the profiler, the import statement was executed before I start profiling. I have the following log : ncalls tottime percall cumtime percall filename:lineno(function) 280812/263643 5.080 0.000 7.880 0.000 /usr/lib/python2.2/site-packages/_xmlplus/dom/FtNode.py:79(__getattr__) 109449 1.870 0.000 2.570 0.000 /usr/lib/python2.2/site-packages/_xmlplus/xpath/yappsrt.py:111(_peek) 3086 1.240 0.000 6.440 0.002 /usr/lib/python2.2/site-packages/_xmlplus/dom/Element.py:182(setAttributeNodeNS) 3494 1.080 0.000 1.270 0.000 /usr/lib/python2.2/site-packages/_xmlplus/xpath/XPathGrammar.py:716(__init__) 13048 0.830 0.000 3.860 0.000 /usr/lib/python2.2/site-packages/_xmlplus/dom/FtNode.py:371(_4dom_fireMutationEvent) 3086 0.820 0.000 1.710 0.001 /usr/lib/python2.2/site-packages/_xmlplus/dom/NamedNodeMap.py:107(setNamedItemNS) 129785 0.810 0.000 0.810 0.000 /usr/lib/python2.2/site-packages/_xmlplus/xpath/XPathGrammar.py:782(token) 3439 0.800 0.000 1.660 0.000 /usr/lib/python2.2/site-packages/_xmlplus/dom/FtNode.py:382(_4dom_validateNode) 38117 0.800 0.000 1.570 0.000 /usr/lib/python2.2/site-packages/_xmlplus/xpath/ParsedNodeTest.py:130(match) 6525 0.760 0.000 0.950 0.000 /usr/lib/python2.2/site-packages/_xmlplus/dom/Event.py:37(__init__) 13048 0.740 0.000 1.280 0.000 /usr/lib/python2.2/site-packages/_xmlplus/dom/FtNode.py:307(dispatchEvent) 9856 0.690 0.000 1.530 0.000 /usr/lib/python2.2/site-packages/_xmlplus/dom/Attr.py:40(_get_value) 3336 0.680 0.000 3.060 0.001 /usr/lib/python2.2/site-packages/_xmlplus/xpath/ParsedAxisSpecifier.py:101(select) 3494 0.560 0.000 17.770 0.005 /usr/lib/python2.2/site-packages/_xmlplus/xpath/__init__.py:60(Evaluate) 35042 0.540 0.000 2.050 0.000 /usr/lib/python2.2/site-packages/_xmlplus/xpath/ParsedAxisSpecifier.py:104(<lambda>) 254 0.540 0.002 15.670 0.062 /usr/lib/python2.2/site-packages/Modeling/Attribute.py:520(initWithXMLDOMNode) 25233 0.470 0.000 0.480 0.000 /usr/lib/python2.2/site-packages/_xmlplus/dom/NodeList.py:25(__getattr__) 3494 0.440 0.000 12.210 0.003 /usr/lib/python2.2/site-packages/_xmlplus/xpath/pyxpath.py:317(parse) 20336 0.420 0.000 0.530 0.000 /usr/lib/python2.2/site-packages/_xmlplus/xpath/yappsrt.py:117(_scan) It seems clear to me that either we our DOM implementation is really unefficient or my model is too complex. Having 40 entities in my model, I think it should be easy to parse. Anyone had the same problem ? Any quick solutions ? - -- Yannick Gingras Byte Gardener, Savoir-faire Linux inc. (514) 276-5468 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+U9Yqrhy5Fqn/MRARAupwAJ4k8ztpwHyoKJK4+eSSRtNYzBYppQCfWbl6 SpiGZAVkm699Qk0utI+ocJ4= =EUKZ -----END PGP SIGNATURE----- |