ShadowNode icon indicating copy to clipboard operation
ShadowNode copied to clipboard

stream: support more options

Open legendecas opened this issue 6 years ago • 7 comments

Support following construction options for stream

  • [ ] objectMode
  • [ ] decodeStrings

legendecas avatar Jul 06 '18 11:07 legendecas

Can you assign it to me? I will try! Thanks:)

Txiaozhe avatar Jan 02 '19 09:01 Txiaozhe

Can you assign it to me? I will try! Thanks:)

Yes, definitely

legendecas avatar Jan 02 '19 09:01 legendecas

Thanks!:)

Txiaozhe avatar Jan 02 '19 09:01 Txiaozhe

@Txiaozhe we could discuss here, the object mode is designed for writing stuffs in buffer/string, and create pipelines for object processing. Thus we should take a look at how object mode works in ShadowNode, if that implementation takes too much memory or performance, I think we should reconsider this feature :)

yorkie avatar Mar 01 '19 06:03 yorkie

I have read some source code about stream module of ShadowNode, but I didn't find anything special with node except it is not perfect yet. If we keep it's data struct in array, I think it is not very appropriate to do some slow operate. And if there are few practical scenarios for objectNode option, I think we could shelve it temporary!

Txiaozhe avatar Mar 01 '19 07:03 Txiaozhe

Array is simpler than linked one, the linked object should take more memory.

yorkie avatar Mar 01 '19 07:03 yorkie

Yeah, stream of ShadowNode is simpler and more resource-efficient, so if there are few practical scenarios for objectNode option, I think we could shelve it temporary

Txiaozhe avatar Mar 01 '19 07:03 Txiaozhe