OCA / odoo-module-migrator

Python library to migrate odoo base code from a version to another
GNU Affero General Public License v3.0
131 stars 119 forks source link

Parsing large XML takes infinite time #12

Open chand3040 opened 5 years ago

chand3040 commented 5 years ago

When migration is done from V10 to V11 it tires to search for color attribute inside tree view it tries to parse the xml and when it tries to parse xml in many cases it keeps parsing infinitely.

I can attach screenshots if required. To be more exact replacing these lines "<tree(\n|.|\t)color=\"[^>]": "color attribute is deprecated in tree view. Use decoration- instead.", in file migrate_100_110.py skips the parsing.

Let me know if I need to put in more steps for replication of same.

legalsylvain commented 5 years ago

Hi @chand3040 make sense. could you make a PR ?

flachica commented 4 years ago

I solve this in this PR

If is be found a tree view without a color attribute, regex cannot find the end of file. In future, I will refactor to use lxml lib for this work