For downloading thumbnails it would be nice to have the ability to have
multiple connections in one thread and use something like select()
or poll() instead of having multiple threads.
I did not found a solution for python-requests, but found pycurl which
can do such a thing.
Replace python-requests with pycurl (pycurl.CurlMulti()).
Core
Currently many features are handled inside views/*.py or models/*.py.
I like to move some of them to core/*.py. This will making tests for the
overall features more easy and eventually the core module could be turned
into a lib to be used by other UI/GUI projects.
The list below is probably incomplete and will be updated in the future:
Instances filter.
Instance selecter (random instance).
All thread stuff (create Qt subclass in anything but core when
needed, but keep core free of Qt stuff, so use the Python
threading module).
Threads
Current implementations of the request threads have flaws, they are not
safe. Surprisingly I did not encounter any problems yet on current
releases but while developing the images branch I ran into issues which
made them visible to me inside the code (locks are needed here and there).
On releases v0.5 and v0.6 this may be an issue when a request is made
and the connection settings are changed, but the timing has to be perfect.
## Connections
For downloading thumbnails it would be nice to have the ability to have
multiple connections in one thread and use something like `select()`
or `poll()` instead of having multiple threads.
I did not found a solution for `python-requests`, but found `pycurl` which
can do such a thing.
- [ ] Replace `python-requests` with `pycurl` (`pycurl.CurlMulti()`).
## Core
Currently many features are handled inside `views/*.py` or `models/*.py`.
I like to move some of them to `core/*.py`. This will making tests for the
overall features more easy and eventually the `core` module could be turned
into a lib to be used by other UI/GUI projects.
The list below is probably incomplete and will be updated in the future:
- [ ] Instances filter.
- [ ] Instance selecter (random instance).
- [ ] All thread stuff (create `Qt` subclass in anything but `core` when
needed, but keep core free of `Qt` stuff, so use the Python
`threading` module).
## Threads
Current implementations of the request threads have flaws, they are not
safe. Surprisingly I did not encounter any problems yet on current
releases but while developing the images branch I ran into issues which
made them visible to me inside the code (locks are needed here and there).
On releases v0.5 and v0.6 this may be an issue when a request is made
and the connection settings are changed, but the timing has to be perfect.
- [ ] Thread-safety
## Thumbnail support
See https://notabug.org/CYBERDEViL/searx-qt/pulls/15
Connections
For downloading thumbnails it would be nice to have the ability to have multiple connections in one thread and use something like
select()
orpoll()
instead of having multiple threads.I did not found a solution for
python-requests
, but foundpycurl
which can do such a thing.python-requests
withpycurl
(pycurl.CurlMulti()
).Core
Currently many features are handled inside
views/*.py
ormodels/*.py
. I like to move some of them tocore/*.py
. This will making tests for the overall features more easy and eventually thecore
module could be turned into a lib to be used by other UI/GUI projects.The list below is probably incomplete and will be updated in the future:
Qt
subclass in anything butcore
when needed, but keep core free ofQt
stuff, so use the Pythonthreading
module).Threads
Current implementations of the request threads have flaws, they are not safe. Surprisingly I did not encounter any problems yet on current releases but while developing the images branch I ran into issues which made them visible to me inside the code (locks are needed here and there).
On releases v0.5 and v0.6 this may be an issue when a request is made and the connection settings are changed, but the timing has to be perfect.
Thumbnail support
See https://notabug.org/CYBERDEViL/searx-qt/pulls/15