Hi Markus,
The answer to your last bullet point (above) is yes -- serialization for sequence<long> ultimately occurs in IceInternal::BasicStream::write(const vector<Long>& v) [ICE/C++] which does a direct copy from the vector's buffer to an internal buffer class (Container) as follows :-
Code:
void
IceInternal::BasicStream::write(const vector<Long>& v)
{
Int sz = static_cast<Int>(v.size());
writeSize(sz);
if(sz > 0)
{
Container::size_type pos = b.size();
resize(pos + sz * sizeof(Long));
#ifdef ICE_BIG_ENDIAN
const Byte* src = reinterpret_cast<const Byte*>(&v[0]) + sizeof(Long) - 1;
Byte* dest = &(*(b.begin() + pos));
for(int j = 0 ; j < sz ; ++j)
{
*dest++ = *src--;
*dest++ = *src--;
*dest++ = *src--;
*dest++ = *src--;
*dest++ = *src--;
*dest++ = *src--;
*dest++ = *src--;
*dest++ = *src--;
src += 2 * sizeof(Long);
}
#else
memcpy(&b[pos], reinterpret_cast<const Byte*>(&v[0]), sz * sizeof(Long));
#endif
}
}
Just offering my opinion here... I'm not sure why you want to use ICE to persist an 8GB internal vector of longs. I'd only model this is in slice if I wanted to transport the vector via a middleware call or wanted Freeze to persist it. There's no other reason to use ICE for this... Since you have such a basic serialization (iterate over a vector of longs) you could get zero-copy by handrolling your own in this case. I'd be sure to flush often to ensure 8GB was committed properly though. I have a similar need and I store a base value (64bit) + vector of offsets from this (8 to 16 bit) which allows > 80%diskspace reduction on average, which is perhaps another reason handrolling your own might be beneficial in your case.
HTH