Skip to content

The { EasySax - sax-js - Saxen } performance shoot out

Notifications You must be signed in to change notification settings

nikku/js-sax-parser-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Benchmarking JS XML parsers

This small test compares the following SAX-style XML parsers avaliable:

Test Coverage

The following aspects are tested

  • strict mode (parsing XML only)
  • events: openTag, closeTag, text
  • attribute processing on
  • entity decoding on
  • namespace parsing on

Results

Size

Comparing parsers by bundled size:

parser default min+gzipped
sax-js 40KB 6.7 KB
easysax 20KB 2.1KB
saxen 21KB 2.6KB

XML Parse Time

Parsing ./complex.bpmn.

parser average time
sax-js 30.3ms
easysax 5.2ms
saxen 5.1ms

Cf. tests.

How to Run

npm install

# test minify
npm run minify

# test performance (in browser)
npm run perf

# open index.html in a web browser

🚀

About

The { EasySax - sax-js - Saxen } performance shoot out

Resources

Security policy

Stars

Watchers

Forks

Sponsor this project