diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-10 18:32:18 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-10 19:18:18 +0100 |
commit | f2732c7af13110a72ded2667684f52a86a23de2f (patch) | |
tree | 12913bcac967ab51b807dd5316e6b205296ac4ee /csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs | |
parent | 29fe8d223e5f857c4b2949424c95a74c9f6901f0 (diff) | |
download | protobuf-f2732c7af13110a72ded2667684f52a86a23de2f.tar.gz protobuf-f2732c7af13110a72ded2667684f52a86a23de2f.tar.bz2 protobuf-f2732c7af13110a72ded2667684f52a86a23de2f.zip |
More TODOs done.
- Removed a TODO without change in DescriptorPool.LookupSymbol - the TODOs were around performance, and this is only used during descriptor initialization
- Make the CodedInputStream limits read-only, adding a static factory method for the rare cases when this is useful
- Extracted IDeepCloneable into its own file.
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs b/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs index 157ea400..759955e6 100644 --- a/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs +++ b/csharp/src/Google.Protobuf/Reflection/DescriptorPool.cs @@ -257,10 +257,12 @@ namespace Google.Protobuf.Reflection /// or unqualified. C++-like name lookup semantics are used to search for the /// matching descriptor. /// </summary> + /// <remarks> + /// This isn't heavily optimized, but it's only used during cross linking anyway. + /// If it starts being used more widely, we should look at performance more carefully. + /// </remarks> internal IDescriptor LookupSymbol(string name, IDescriptor relativeTo) { - // TODO(jonskeet): This could be optimized in a number of ways. - IDescriptor result; if (name.StartsWith(".")) { @@ -282,7 +284,6 @@ namespace Google.Protobuf.Reflection { // Chop off the last component of the scope. - // TODO(jonskeet): Make this more efficient. May not be worth using StringBuilder at all int dotpos = scopeToTry.ToString().LastIndexOf("."); if (dotpos == -1) { |