Skip to content

Maximum script size too short (Painless) #25527

@conquel

Description

@conquel

The maximum Painless script size is now set to 16384 bytes.
As I understand, it is hardcoded in Compiler.java:
static final int MAXIMUM_SOURCE_LENGTH = 16384;
This is not enough for my use case.

My workaround now is to compress the script by removing spaces, line breaks and shortening some variable names to make the file fit in the 16 Kb.

Is there any serious reason behind this limitation? It would be great to consider allowing a user to change this value in the configuration file or at least set it to some 64 Kb.

Activity

cbuescher

cbuescher commented on Jul 4, 2017

@cbuescher
Member

@conquel I think the original reasoning here was that scripts should be relatively small under normal circumstances, otherwise people tend to write plugins for more complicated things. I marked this for discussion but for that it would be good to get some more information about your use case for that. Can you briefly describe why your script needs to be so long? Maybe there are alternatives to consider instead of increasing this limit.

jasontedor

jasontedor commented on Jul 4, 2017

@jasontedor
Member

Duplicates #23209

jasontedor

jasontedor commented on Jul 4, 2017

@jasontedor
Member

@conquel I would suggest leaving an answer to @cbuescher's question on #23209 otherwise we end up with a fractured discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jasontedor@cbuescher@conquel

        Issue actions

          Maximum script size too short (Painless) · Issue #25527 · elastic/elasticsearch