Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Package] - Limit display result size for pieces #185

Open
vinicvaz opened this issue Nov 27, 2023 · 0 comments
Open

[Package] - Limit display result size for pieces #185

vinicvaz opened this issue Nov 27, 2023 · 0 comments
Assignees
Labels
domino-py Domino Python package related issues

Comments

@vinicvaz
Copy link
Collaborator

We aim to restrict the size of data stored in the BasePiece.display_result property, as these values are transmitted to the frontend for UI rendering. Allowing excessively large data might lead to performance issues in front-to-back communication.
To prevent this, maybe we can limit the display_result property to a specific number of bytes. This ensures that developers working on new pieces won't inadvertently save excessively large data, thereby mitigating potential performance problems.

Something like this would solve:

    @property
    def display_result(self):
       return self._display_result

    @display_result.setter
    def display_result(self, value):
        max_bytes = 10
        if size_in_bytes(value) > max_bytes:
             raise SomeException
        self._display_result = value
@vinicvaz vinicvaz added the domino-py Domino Python package related issues label Nov 27, 2023
@vinicvaz vinicvaz self-assigned this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domino-py Domino Python package related issues
Projects
None yet
Development

No branches or pull requests

1 participant