On Thu, Apr 22, 2010 at 10:18 AM, Anton Muhin <[email protected]> wrote: > On Thu, Apr 22, 2010 at 9:05 PM, Ryan Dahl <[email protected]> wrote: >> On Thu, Apr 22, 2010 at 12:19 AM, Anton Muhin <[email protected]> wrote: >>> Ryan, >>> >>> just a quick question: couldn't external strings solve the problem for >>> you? They sound pretty much like Buffer you describe as far as I can >>> judge from your email. >>> >>> yours, >>> anton. >> >> I hadn't considered using external strings because I need to write >> utf-8 mostly. I suppose it would be possible to have a subclass of >> ExternalStringResource which allocated and stored its own reference to >> utf-8 encoded data when pushing a string to socket. This might work. > > Couldn't you use Ascii external strings, but actually store encoded > data? If you only use it as a buffer, that should probably work fine, > but you'd better experiment.
Maybe, but that doesn't solve the problem of associating encoded data with a string instance so that the next time the string is written to socket the encoded data is easily accessible. The benchmark I'm interested in fixing is the case where you write a large string many times to a socket. -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
