[英]How to limit number of downloaded (parsed) entries (items) in ROME Fetcher
I am using ROME
& ROME Fetcher
for getting Feeds ( ATOM/RSS
) in my JavaEE
web application. 我正在使用
ROME
& ROME Fetcher
在JavaEE
Web应用ROME Fetcher
中获取提要( ATOM/RSS
)。
In some cases I would like to limit number of downloaded/parsed entries/items. 在某些情况下,我想限制下载/解析的条目/项目的数量。 I want to avoid this scenario: get all and ten just make
subList()
. 我想避免这种情况:只得到
subList()
就可以得到全部和十个。
Any ideas or anybody solved this somehow ? 任何想法或任何人以某种方式解决了这个问题?
Thanks. 谢谢。
I don't see a feasible way that you could download just a few of them - at the end of the day you send a request to the server and it will decide what to send you. 我看不到一种可行的方法,您可以仅下载其中的一些方法-在一天结束时,您将请求发送到服务器,它将决定向您发送什么内容。
To me this sounds a bit like premature optimization. 对我来说,这听起来有点像过早的优化。 Dependent on what you're building, it might be better to do something like caching data if you're worried about performance.
根据您要构建的内容,如果您担心性能,最好执行诸如缓存数据之类的操作。
Anyhow, I can't see anyway you can do this with ROME, but it could be done if you built your own XML parser. 无论如何,我看不到您可以使用ROME做到这一点,但是如果您构建自己的XML解析器,则可以做到这一点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.