[protobuf] Required C++ version

2014-07-13 Thread Klaus Kraft
Hi all,

can you please tell me which C++ version requirements protobuf assumes? I
would lilke to test the C++ part but need to know the C++ requirements.

Thanks in advance.

Best regards
Klaus

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Performance differences when creating builder - why?

2014-06-24 Thread Klaus Kraft
Hi all,

I was recently comparing different serialization frameworks and one of 
these was Protobuf. A simplified version of the used .proto file is 
attached. After writing a bit java code which creates a certain builder 
instance (code is also attached), I realized that there are some 
performance differences between the execution time for the first invocation 
of the code and the second invocation. I have repeated this several times 
and for different .proto files and it has always been like that.

After debugging the code, I cannot see differences in which code is called 
- my first assumption was that in the first invocation some additional code 
is called which increases the execution time. But I could not find such a 
case. 

Is there any particular reason why the first invocation is "much" slower 
than the second one? I used the most current version of protobuf for the 
evaluation, if this is relevant for the answer.

Thanks in advance.


-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


simple.proto
Description: Binary data
package de.simple.performance;

import de.simple.performance.SimpleProtos.A;
import de.simple.performance.SimpleProtos.AVariant;
import de.simple.performance.SimpleProtos.B;
import de.simple.performance.SimpleProtos.C;

public class SimplePerformance {

	public static void main(String[] args) {
		builderInvocation();
		
		//second invocation "much" faster than the first one - why?
		builderInvocation();
	}
	
	private static void builderInvocation() {
		long start = System.nanoTime();
		
		A.Builder a = A.newBuilder();
		AVariant.Builder aVar = AVariant.newBuilder();
		B.Builder b = B.newBuilder();
		C.Builder c = C.newBuilder();
		c.setName("name1");
		c.setLockReason("lockReason#no");
		b.setC(c);
		aVar.setB(b);
		a.addVariant(aVar);
		
		long end = System.nanoTime();
		
		System.out.println("Execution time: " + (end - start) + " ns");
	}
}


[protobuf] Handle data migration. e.g. moving of field - Java

2014-05-08 Thread Klaus Kraft
Hi,

so far I have defined messages and the only changes I had to handle were 
additions and deletions of fields and renamings of fields. It was no 
problem to handle this using ProtoBuf. Now I am in the situation that I 
defined a message and a field of the message needs to be moved to a field 
of another message. How can one handle such a data migration scenario? The 
main problem is that I do not want to lose the data that was associated 
with the original field that is moved. 

I would also be interested in how to handle comparable, complex, data 
migration scenarios that go beyond additions, deletions and simple 
renamings. If there is no direct support from ProtoBuf, is it possible to 
implement migrations in Java (I'm using Java as my target language)?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.