Linkify perf notice

This commit is contained in:
Dimitry Ivanov 2019-06-04 16:39:07 +03:00
parent df0177af95
commit dba07e3f3c
2 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,6 @@ import ru.noties.markwon.image.file.FileSchemeHandler;
import ru.noties.markwon.image.gif.GifMediaDecoder; import ru.noties.markwon.image.gif.GifMediaDecoder;
import ru.noties.markwon.image.network.OkHttpNetworkSchemeHandler; import ru.noties.markwon.image.network.OkHttpNetworkSchemeHandler;
import ru.noties.markwon.image.svg.SvgMediaDecoder; import ru.noties.markwon.image.svg.SvgMediaDecoder;
import ru.noties.markwon.linkify.LinkifyPlugin;
import ru.noties.markwon.syntax.Prism4jTheme; import ru.noties.markwon.syntax.Prism4jTheme;
import ru.noties.markwon.syntax.Prism4jThemeDarkula; import ru.noties.markwon.syntax.Prism4jThemeDarkula;
import ru.noties.markwon.syntax.Prism4jThemeDefault; import ru.noties.markwon.syntax.Prism4jThemeDefault;
@ -108,7 +107,6 @@ public class MarkdownRenderer {
.addMediaDecoder(SvgMediaDecoder.create()); .addMediaDecoder(SvgMediaDecoder.create());
} }
})) }))
.usePlugin(LinkifyPlugin.create())
.usePlugin(SyntaxHighlightPlugin.create(prism4j, prism4jTheme)) .usePlugin(SyntaxHighlightPlugin.create(prism4j, prism4jTheme))
.usePlugin(GifAwarePlugin.create(context)) .usePlugin(GifAwarePlugin.create(context))
.usePlugin(TablePlugin.create(context)) .usePlugin(TablePlugin.create(context))

View File

@ -3,3 +3,7 @@
Use this module (or take a hint from it) if you would need _linkify_ capabilities. Do not Use this module (or take a hint from it) if you would need _linkify_ capabilities. Do not
use `TextView.setAutolinkMask` (or specify `autolink` in XML) because it will remove all use `TextView.setAutolinkMask` (or specify `autolink` in XML) because it will remove all
existing links and keep only the ones it creates. existing links and keep only the ones it creates.
Please note that usage of this plugin introduces significant performance drop due not
optimal implementation of underlying `android.text.util.Linkify`. If you have any ideas of how
to improve this - PR are welcome!