Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Speed up function
_serialize_series
by 234% in PR #6044 (…
…`refactor-serialization`) (#6079) * feat: Implement serialization functions for various data types and add a unified serialize method * optmize conditional Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com> * fix: Update string and list truncation to include ellipsis for clarity * ⚡️ Speed up function `_serialize_series` by 234% in PR #6044 (`refactor-serialization`) Certainly! Here is a more optimized version of the program. Changes made. 1. Replaced the `apply` method with dictionary comprehension. This avoids creating an intermediate Series, which can be an expensive operation. 2. Moved `_truncate_value` outside of the main function to keep the main function concise and focused. * refactor: Remove unused `_truncate_value` function from serialization module --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org> Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
- Loading branch information