[haiku-development] Re: Streaming Fixes for the Plugin Manager

  • From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 3 Mar 2016 16:00:26 +0100

Hello,

On Thu, Mar 3, 2016 at 11:45 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
wrote:

Hi Dario,

Am 02.03.2016 um 20:25 schrieb Dario Casalinuovo:

The first step to rework the plugin manager sniffing is to introduce the
wrapped BDataIO when a BPositionIO is not available, I think good part
of the work is already done in the BBufferedDataIO class and the wrapper
can be implemented starting from it. That wrapper I guess should have
two subclasses, one implementing the BDataIO interface and another
implementing the BPositionIO one depending on the object passed to
sniff. In any case we can get a performance gain if we buffer the data
used to sniff.


It's hard to follow you; could you make one step back, and try to explain
what you want to achieve how exactly? Why two subclasses?
This is what I would have thought without having thought it through:
Preconditions:
1) We should avoid refetching data whenever possible (for example, while
sniffing)
2) Many streams are actually positionable to allow for seeking (HTTP is
usually positionable).
3) Therefore, we need to differentiate between streams that are truly non
seekable, and those that are.


This means we have to introduce a BStreamingIO into the support kit? Or the
additional methods should be put into BPositionIO itself?



3.) Could be solved entirely in the add-on. But then each add-on would
need to solve this.
Also, buffering could be better handled in the BDataIO/BPositionIO class
(especially for sniffing where more than one add-on is involved).


So, the final AIM is to adjust the add-on to be aware about the different
functionalities supplied by BDataIO, BPositionIO, BStreamingIO?

Other related posts: