I'm working on this now. I note that the new load(InputStream, CasMgrSerialzer, CAS, boolean) method is "public". Is there some code (perhaps in DkPro) that needs this form?
If not, I'll remove this method and make the reading to create the CasMgrSerializer "lzay" - not done until needed. Not sure about zipping the type system - we have 3 choices, perhaps: 1) nothing, 2) zip, 3) custom compression zip (like the rest of form 6). I'm leaning toward doing this work (if ever done) later. ================ I have one more question - there's a comment which I don't see implemented - which says that when a set of deserializations are being done with the same type system, the extra work to handle the type system is only done once: * This method avoids the repeated loading of the typesystem and index definitions * from a stream when loading many CASes in a row. How do you think that should be implemented? -Marshall On 8/11/2016 1:09 PM, Richard Eckart de Castilho wrote: > On 11.08.2016, at 18:05, Marshall Schor <[email protected]> wrote: >> re: CASImpl reinit change, reading the additional passed-in stream for the >> TSI info: >> >> If both this stream is non-null and the header says the primary stream >> already >> has the TSI info, the primary stream's info is used. >> >> The code was changed to always read the additional passed-in stream for the >> TSI >> info, even if it will be ignored later because of the above. >> >> The previous code didn't read this until the logic said it was needed; any >> objections to my putting it back to that way? I may have missed the reason >> for >> wanting to read the additional stream... > I'd have preferred to defer the reading of the TSI stream until it is needed, > but > it didn't seem immediately obvious to me how to do that without duplicating > quite a bit of code... but then, I didn't spend too much time thinking about > it > either. The whole thing took me quite a bit longer than expected anyway, so > I was aiming more towards functionality than efficiency. > > E.g. I also didn't implement storing the TSI gzipped. But that should probably > be a simple thing to add now. > > Best, > > -- Richard
