streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steveblackmon <>
Subject [GitHub] incubator-streams pull request: STREAMS-288 | Removing default beh...
Date Tue, 17 Feb 2015 20:20:58 GMT
Github user steveblackmon commented on the pull request:
    So this is just a performance concern? I agree that creating a new Mapper inside of a
loop is obviously a bad idea.  That's why :
    public class StreamsJacksonMapper extends ObjectMapper {
        private static final StreamsJacksonMapper INSTANCE = new StreamsJacksonMapper();
        public static StreamsJacksonMapper getInstance(){    return INSTANCE;   }
    Get your mapper this way and only once and problem solved.
    I don't think the fact that bad implementations can get slow is a reason to make the default
behavior worse, to make a call that should only happen once per jvm a bit faster.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message