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

api: Add support for 'compacting' components #308

Merged
merged 9 commits into from
Aug 2, 2021
Merged

Conversation

zml2008
Copy link
Member

@zml2008 zml2008 commented Mar 13, 2021

Closes GH-114

This ports the implementation of component compacting over from the original Kotlin provided by @CrushedPixel (see that here)

While this component optimization is expensive enough that it shouldn't be used on every message sent, it can be useful for ensuring components of unknown origin (such as loaded from a configuration, or built from multiple sources) are as compact as possible before being sent to users.

Some things to discuss:

  • The name: Does compact make sense, or should we use something else like optimize or pack?
  • Should a setting be added to the serializers (mainly the Configurate serializer, but possibly others) to auto-compact when loading?

Copy link

@octylFractal octylFractal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kewl, maybe call it optimize if you're gonna call it that internally anyways

@kashike kashike force-pushed the feature/compact branch 2 times, most recently from 8f2a699 to 2843a41 Compare May 30, 2021 01:03
@zml2008 zml2008 removed this from the 4.8.0 milestone Jun 7, 2021
@kashike kashike added this to the 4.9.0 milestone Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add methods to compact text
4 participants