[
https://issues.apache.org/jira/browse/THRIFT-3032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xiaoshuang LU updated THRIFT-3032:
----------------------------------
Description: A "TBaseProcessor" uses a map to store all the methods of a
service. I suggest that an array or "ArrayList" should be used. Methods can be
identified by indices for which the worst-case complexity is O(1) while
computing hash code for a string is not. To achieve this goal, we may tell the
compiler to generate a enumeration constant list of all the methods per
service. The ordinals of the enumeration constants need to be package into the
messages rather than the name of methods. And in theory network overhead
should be reduced additionally. (was: A "TBaseProcessor" uses a map to store
all the methods of a service. I suggest that a array or "ArrayList" should be
used. Methods can be identified by indices for which the worst-case complexity
is O(1) while computing hash code for a string is not. To achieve this goal,
we may tell the compiler to generate a enumeration constant list of all the
methods per service. The ordinals of the enumeration constants need to be
package into the messages rather than the name of methods. And in theory
network overhead should be reduced additionally.)
> performance improvement for TBaseProcessor
> ------------------------------------------
>
> Key: THRIFT-3032
> URL: https://issues.apache.org/jira/browse/THRIFT-3032
> Project: Thrift
> Issue Type: Story
> Components: Java - Library
> Affects Versions: 0.9.1, 0.9.2
> Reporter: Xiaoshuang LU
>
> A "TBaseProcessor" uses a map to store all the methods of a service. I
> suggest that an array or "ArrayList" should be used. Methods can be
> identified by indices for which the worst-case complexity is O(1) while
> computing hash code for a string is not. To achieve this goal, we may tell
> the compiler to generate a enumeration constant list of all the methods per
> service. The ordinals of the enumeration constants need to be package into
> the messages rather than the name of methods. And in theory network overhead
> should be reduced additionally.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)