[ https://issues.apache.org/jira/browse/THRIFT-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13774545#comment-13774545 ]
Ben Craig commented on THRIFT-2200: ----------------------------------- I have not tested the patch and I don't use fingerprints / dense protocol, but it looks (mostly) good. The only thing that I saw that seemed off was the following lines: + if( rv.capacity() > (rv.size() + 0x4000)) { + rv.reserve( rv.size()); // correct heavily oversized allocations to reduce memory footprint + } string::reserve usually won't shrink a string's capacity. I would recommend removing those lines. > nested structs cause generate_fingerprint() to slow down at excessive CPU load > ------------------------------------------------------------------------------ > > Key: THRIFT-2200 > URL: https://issues.apache.org/jira/browse/THRIFT-2200 > Project: Thrift > Issue Type: Bug > Components: Compiler (General) > Reporter: Jens Geyer > Assignee: Jens Geyer > Fix For: 0.9.2 > > Attachments: THRIFT-2200_slow_fingerprints.patch > > > The file http://pastebin.com/H5Uj74aW contains a number of nested structs > definitions. These highly recursive structs (over 8 levels in this case) > cause the get_fingerprint_material() method to loop over minutes. > Thanks to Niclas who prepared the pastebin. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira