• Resolved Blutarsky

    (@blutarsky)


    I see that the string search is limited to 800 bytes. In my setup Preg functions setting pcre.backtrack_limit is set to 1MB. Can I increase substring to 50.000?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    Technically it’s not bytes, it’s string characters.

    “Example string”

    The quoted text, including the quotes, is 16 characters. The plugin, as is, limits to the first 800 characters in that same way. I’m pretty certain it was done as such to prevent performance issues with searching a HUGE blob of text.

    However, we do have https://github.com/WebDevStudios/Automatic-Featured-Images-from-Videos/blob/1.0.3/automatic-featured-images-from-videos.php#L48-L49 that can be used to replace what gets searched. You can provide whatever value you want, mostly useful for allowing to store video URLs in post meta for example. I do know we didn’t make it the easiest to do, since we don’t also provide a post ID to utilize, in version 1.0.x. We have fixed that in 1.1.0, but it needs a bit more testing before we’re comfortable with releasing.

    If you’re willing to test it out, we’d love the help. The character limit there hasn’t changed, but we do help with providing your own content to search.

    Thread Starter Blutarsky

    (@blutarsky)

    I have modified the limit to 50,000 characters, seems working with no performance impact

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    server configurations matter as well, for what it’s worth. Someone who may still be on PHP 5.2 would potentially have worse performance than someone on PHP 7.1.

    Just saying, good to hear your modified version isn’t being affected at the moment.

    Thread Starter Blutarsky

    (@blutarsky)

    Would you discourage using very long strings?

    Plugin Support Michael Beckwith

    (@tw2113)

    The BenchPresser

    it’d be something I need to test, to really come up with a solid answer. For this case, I’m going to say use what you need for your use-case ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Why limited to first 800 bytes?’ is closed to new replies.