yandex / yandex-tank

Load and performance benchmark tool
Other
2.46k stars 278 forks source link

Try BeautifulSoup instead of lxml #132

Closed direvius closed 9 years ago

direvius commented 9 years ago

BeautifulSoup is all-python and lxml is a C extension. So it's easier to deploy BeautifulSoup. But we need to compare them in details before moving from one to another.

ei-grad commented 9 years ago

Hey, is that right, that you guys are using lxml only for config parsing?

[ ei-grad@yoga-s1 ~/yandex-tank ‹master› ]
→ git grep lxml; git grep etree                 
.travis.yml:  - pip install lxml
data/yandex-tank.spec:Requires:   python-lxml
setup.py:        'lxml',
yandextank/plugins/Monitoring/collector.py:from lxml import etree
yandextank/plugins/Monitoring/collector.py:from lxml import etree
yandextank/plugins/Monitoring/collector.py:        self.tree = etree.parse(config)
yandextank/plugins/Monitoring/collector.py:            tree = etree.parse(filename)

Just replace it with builtin xml module. Can't even imagine for what you could need the BeautifulSoup crap in yandex-tank...

undera commented 9 years ago

Yes, it is intentional. It allows you to paste whole xml config instead of filename and it will work.

ei-grad commented 9 years ago

Are you sure want to bring a 50k-lines-of-code library having xpath/xslt implementations just to be able to determine is the variable a file name or a file content?..

ei-grad commented 9 years ago

created #133