You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Buffer was required to convert to String to satisfy trait Source. With the signature sign of stream_chunks, string converted from RawSource::Buffer needs to be stored on the RawSource to get a satisfying lifetime. Most of the used variant of RawSource is String, so this would add extra 40-byte size overhead for creating RawSource::String (64-byte RawSource, String only takes 24 bytes)
I'm here to propose splitting RawSource into two types: RawStringSource and RawBufferSource.
(on 64-bit machine)
The text was updated successfully, but these errors were encountered:
Cached Source types like CachedSource creates a copy of the original data.
For type RawSource which was wrapped by CachedSource would contain two copies of raw data.
This just probably does not make any sense for caching source code or any other source code types.
I don't know if we can remove source cache from intermediate source types. Consider of this scenario:
This would create three copies of code and the first CachedSource contains source code that is an intermediate result. Maybe we should cache the last one(OriginalSource and edits and cache are stored) or we just give up on caching source code(only OriginalSource and edits are stored).
RawSource
contains two variants:Buffer was required to convert to
String
to satisfy traitSource
. With the signature sign ofstream_chunks
, string converted fromRawSource::Buffer
needs to be stored on theRawSource
to get a satisfying lifetime. Most of the used variant ofRawSource
isString
, so this would add extra 40-byte size overhead for creatingRawSource::String
(64-byteRawSource
, String only takes 24 bytes)I'm here to propose splitting
RawSource
into two types:RawStringSource
andRawBufferSource
.(on 64-bit machine)
The text was updated successfully, but these errors were encountered: