Skip to content

Conversation

@sneal
Copy link
Member

@sneal sneal commented Jul 24, 2014

WIP - DO NOT MERGE!

Seeing what the WinRM library would look like without a Nokogiri dependency. All integration tests pass, however there's still TODOs left around the unhappy path.

seandilda and others added 6 commits December 2, 2013 14:18
…ries

This allows the code to be used in an app that's using Savon 2.x
Conflicts:
	winrm.gemspec
Conflicts:
	README.md
	Rakefile
	lib/winrm/winrm_service.rb
	spec/config-example.yml
	spec/nori_type_casting_spec.rb
	winrm.gemspec
Replaced usages of Nokogiri with Rexml. While slower, its not noticable since the cost is really the remote WinRM calls anyway.
@sneal
Copy link
Member Author

sneal commented Jul 30, 2014

Closing, will be part of the 1.3 release.

@sneal sneal closed this Jul 30, 2014
@sneal sneal deleted the remove-nokogiri-dependency branch July 30, 2014 15:22
@maxlinc
Copy link
Contributor

maxlinc commented Dec 17, 2014

I'm not sure this is a good idea.

REXML is part of the Ruby standard library, but it's also very slow so most projects don't use it.

According to a (very outdated) xml benchmark:

Note that the parsing time is in seconds and the Y-axis is logarithmic. Yes, Hpricot took over a minute, and REXML took over two minutes, while Nokogiri and libxml-ruby came in at a few seconds.

Nokogiri has a reputation of being a bit annoying to install, but it's also very commonly used. According to RubyToolbox:

So, assuming everyone is using the most popular projects, roughly one out of 3 Rubyists use Nokogiri

That probably includes the most popular projects that depend on WinRM, including Vagrant.

This is why projects like Nori are pluggable. It prefers Nokogiri but will use REXML if it's unavailable. Similarly, there's MultiXML (inspired by MultiJSON) which helps you choose the fastest available XML library. Unfortunately I think MultiXML only supports parsing XML, not building it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants