Hey Guys,
I want to migrate my system from Active Python 2.4 to Python 2.6.5. However I face some problem in parsing XML files. The I/O is very slow.
My sample xml file
<config><dicts><dictName>EnvDict</dictName><dictElems><key>AppServerIP</key> <value>localhost</value><key>DBServerIP</key> <value>localhost</value><key>DBServerName</key> <value>DB1</value></dictElems></dicts></config>
My log shows this xml parsing took 25s.
My system is structure as below
Publisher-Subr is used to redirect request to different modules
ClntMgrFact is attached to PubSubr and listen to pre-defined ports. It will spawn a new process for login from client.
ClntMgr(process) is spawned by ClntMgrFact and also attached to PubSubr. ClntMgr will generate a ClntWorker(thread) to process workflow.
ClntWorker need to read some static XML file from local. But the parsing is extremely slow. My XML file is around 500 - 700k.
Any one can help on this without changing the system structure? Thanks in advance.