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

[Feature] Support char[] Input and Output for CSS Minification #398

Open
DOWEBGit opened this issue Jun 19, 2024 · 1 comment
Open

[Feature] Support char[] Input and Output for CSS Minification #398

DOWEBGit opened this issue Jun 19, 2024 · 1 comment

Comments

@DOWEBGit
Copy link

It would be beneficial if NUglify could support char[] as both input and output for the CSS/JS minification process. This would help minimize memory allocations and optimize performance.

The char[] can be rent from a pool.

Input: Allow char[] array as input for the Uglify.Css method.
Output: Return the minified result as a char[] array, ensuring minimal memory allocation.

Example Usage:

char[]` cssInput = ... // CSS input as a char array`

UglifyResult result = Uglify.Css(cssInput);

char[] minifiedCssOutput = result.MinifiedContentAsCharArray;

Benefits: Reduced Memory Allocation: Avoids extra allocations from converting between char[] and string.

Performance Improvement: Enhances performance, especially for large CSS files.

Thank you

@trullock
Copy link
Owner

NUglify was never memory optimised , but you're welcome to submit a PR

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

No branches or pull requests

2 participants