twitter-text icon indicating copy to clipboard operation
twitter-text copied to clipboard

Java: TwitterTextParser creates unnecessary objects

Open denisk20 opened this issue 7 years ago • 2 comments

Every call to TwitterTextParser.parseTweet now creates a new TwitterTextParseResults object, which in turn has 2 nested Range objects. While this makes sense for server development it is a terrible pattern for mobile since garbage collection is much more expensive there. Please consider providing us with an overloaded parseTweet which will accept an outTwitterTextParseResult as a parameter.

denisk20 avatar Jan 16 '18 11:01 denisk20

Hoping to circle back to twitter-text issues next week (Feb 25th)

leeaustinadams avatar Feb 22 '19 16:02 leeaustinadams

The problem with a mutable TwitterTextParseResults is that.. it's mutable. I haven't addressed this yet, not sure if it's still a concern.

leeaustinadams avatar Feb 11 '20 16:02 leeaustinadams