Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353862

Summary: Improve performance of QuotedStringTokenizer.quote()
Product: [RT] Jetty Reporter: Simone Bordet <simone.bordet>
Component: serverAssignee: Simone Bordet <simone.bordet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: 7.4.5   
Target Milestone: 7.5.x   
Hardware: PC   
OS: Linux   
Whiteboard:

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.