Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353862 - Improve performance of QuotedStringTokenizer.quote()
Summary: Improve performance of QuotedStringTokenizer.quote()
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.5.x   Edit
Assignee: Simone Bordet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-04 05:48 EDT by Simone Bordet CLA
Modified: 2011-08-04 06:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Bordet CLA 2011-08-04 05:48:35 EDT
QuotedStringTokenizer.quote() performance is critical to JSON generation, since field names must be quoted and field values are most of the times strings.
Comment 1 Simone Bordet CLA 2011-08-04 06:25:55 EDT
Fixed by rewriting the method to less code and using a small array to lookup escapes. This version yields a 35-40% improvement over the previous version.