You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem occurs when we have a text with about 3000 symbols, all made of "www.gmail.com www.gmail.comwww.gmail.com..." about 230 of them, there are 26 000 for loop iterations in SpannableStringInternal.getSpans() :
at android.text.SpannableStringInternal.getSpans(SpannableStringInternal.java:216)
at android.text.SpannableString.getSpans(SpannableString.java:25)
at android.text.SpannableStringInternal.sendSpanAdded(SpannableStringInternal.java:310)
at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:138)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at com.klinker.android.link_builder.LinkBuilder.applyLink(LinkBuilder.java:226)
at com.klinker.android.link_builder.LinkBuilder.addLinkToSpan(LinkBuilder.java:199)
at com.klinker.android.link_builder.LinkBuilder.addLinkToSpan(LinkBuilder.java:174)
at com.klinker.android.link_builder.LinkBuilder.build(LinkBuilder.java:148)
The problems seems that after every setSpan() call there is a sendSpanAdded() call, which triggers the getSpans(), which iterates for every span it has.
The text was updated successfully, but these errors were encountered:
The problem occurs when we have a text with about 3000 symbols, all made of "www.gmail.com www.gmail.com www.gmail.com..." about 230 of them, there are 26 000 for loop iterations in SpannableStringInternal.getSpans() :
at android.text.SpannableStringInternal.getSpans(SpannableStringInternal.java:216)
at android.text.SpannableString.getSpans(SpannableString.java:25)
at android.text.SpannableStringInternal.sendSpanAdded(SpannableStringInternal.java:310)
at android.text.SpannableStringInternal.setSpan(SpannableStringInternal.java:138)
at android.text.SpannableString.setSpan(SpannableString.java:46)
at com.klinker.android.link_builder.LinkBuilder.applyLink(LinkBuilder.java:226)
at com.klinker.android.link_builder.LinkBuilder.addLinkToSpan(LinkBuilder.java:199)
at com.klinker.android.link_builder.LinkBuilder.addLinkToSpan(LinkBuilder.java:174)
at com.klinker.android.link_builder.LinkBuilder.build(LinkBuilder.java:148)
The problems seems that after every setSpan() call there is a sendSpanAdded() call, which triggers the getSpans(), which iterates for every span it has.
The text was updated successfully, but these errors were encountered: