Archived

This forum has been archived. Please start a new discussion on GitHub.

Efficiency with very long strings

I have a general efficiency question as I am thinking through my interfaces. In the process of developing my application I will be likely passing around very long strings (for example, a detailed parse tree for a 15-word sentence -- this can easily be 15,000 characters). These are represented in C++ as std::string. I am wondering how much copying would be going on, if it is likely to affect efficiency of my interfaces, and if I should plan ahead of time to do something about it.

Comments

  • matthew
    matthew NL, Canada
    I don't think you will have issues with 15k strings. From an Ice point of view, the network latency will be much higher than any time you spend allocating and copying strings. If you are using highly compressible data (such as strings) you might consider using protocol compression to minimize the amount of data you are sending over the network.