Open Minoru opened 7 years ago
Just to check, does the "mark article read" function connect to the server every time? Just because it's almost instantaneous when syncing with tt-rss, so I guessed that it was just a local command.
They both connect to server every time. TT-RSS does it through Newsbeuter's utility function utils::retrieve_url
, while OwnCloud News rolls their own implementation, but as far as I can see it's all the same in the end.
I'm not sure if relevant, but I thought I might try testing the following:
In the case of tt-rss, it was instantaneous for both 2 and 4. However, with ownCloud/Nextcloud, 2 was slow as mentioned above, but oddly enough, 4 was instantaneous…?
I have no explanation for that :(
I was reading our TT-RSS API code just now and found that "mark article read" is handled separately: a thread is spawned and retrieve_url
is called there. This is why it's so fast in TT-RSS.
As for ownCloud being instantaneous in scenario No 4, that's probably because the DNS lookup failed and the request just never happened.
As for ownCloud being instantaneous in scenario No 4, that's probably because the DNS lookup failed and the request just never happened.
Interesting. So if I understand correctly, you are saying probably what is happening in No 2 is that the first step is DNS lookup, then … some other kind of newsbeuter processing that is very slow.
I'm clarifying because I just ran the test again on my home network, where /etc/hosts
points the tt-rss domain name directly to my server's internal IP address instead. This time No 2 was still slow. Hence, it's not DNS lookup itself that is slow, but presumably something that occurs after this. (I'm 90% sure that's what you meant, but just wanted to be explicit.)
you are saying probably what is happening in No 2 is that the first step is DNS lookup, then … some other kind of newsbeuter processing that is very slow.
It's not Newsbeuter processing per se, it's a request to TT-RSS. First we do a DNS lookup to convert hostname (e.g. example.com) into an IP address (e.g. 192.0.2.1). Then a TCP connection to that IP is established. Then we do an HTTP request and get a response.
If any of the steps fail, the whole operation is aborted. That's what I meant: the operation without network is fast because it fails early and aborts.
Ah right. Sorry, I should have been clearer. I was referring to the differences in No 2 and No 4, which only occurs when I use Nextcloud, not tt-rss. However, you answered my question anyway. Nextcloud is instantaneous with No 4 because the operation is aborted. Cheers.
Reported by @protist.
Newsbeuter version (copy from
newsbeuter -v
): 2.10-d1c1Steps to reproduce the issue:
Other info you think is relevant:
The instance is not ownCloud but nextCloud. They have the same API.