Searx: Replace Flask by another framework.

Created on 24 Apr 2017  路  4Comments  路  Source: searx/searx

Flask is slow compare to other framework.

webapp.py is the only file to directly depends of Flask (other files uses Flask-Babel).

Some frameworks :

  • falcon was updated recently.
  • wheezy hasn't been updated since may 2016.
  • sanic only supports python 3.5

Some links :

core

Most helpful comment

The network latency of the foreign search requests is much bigger than the performance penalty of flask. While we can't prove that flask significantly degrades our performance, i have to agree with @Nikola-K.

All 4 comments

I'm not too familiar with this project but based on the linked test which is most realistic for this type of project https://klen.github.io/py-frameworks-bench/#remote there doesn't seem to be much difference, in fact flask is better than some other frameworks. Is flask really the bottleneck for this project?

In my personal experience, unless you're going with an async type of framework the performance gains from switching from flask to falcon are negligible at best.

The network latency of the foreign search requests is much bigger than the performance penalty of flask. While we can't prove that flask significantly degrades our performance, i have to agree with @Nikola-K.

I forgot the question mark at the end of the subject and the first sentence :-)

Adding to the discussion that there is even a drop in replacement for Flask called Quart which is written with python3's asyncio. Considering python2's end of life, shouldn't we migrate searx to python3 making use of asyncio, uvloop, etc.?

Was this page helpful?
0 / 5 - 0 ratings