GithubHelp home page GithubHelp logo

Does this code work in rails 3? about fastxml HOT 7 OPEN

rti avatar rti commented on September 28, 2024
Does this code work in rails 3?

from fastxml.

Comments (7)

rti avatar rti commented on September 28, 2024

I never tested it. Sorry. But it might be worth a try since the principle is quite simple.

from fastxml.

ms-ati avatar ms-ati commented on September 28, 2024

I see what you mean. It looks like, however, that there is a lot of
duplication of the general to_xml logic from AR 2.3.x.

Just off the top of my head, it looks like we'd have to 'rebase' your
modifications off of the 3.0.x code, right? In other words, we'd want
to start with the current state of those methods, and merge in the
LibXML::XML::Node stuff in the appropriate places, right?

Please let me know if I am not understanding correctly how this works.

-Marc

On Sat, Jun 4, 2011 at 3:52 AM, rti
[email protected]
wrote:

I never tested it. Sorry. But it might be worth a try since the principle is quite simple.

Reply to this email directly or view it on GitHub:
#1 (comment)

from fastxml.

rti avatar rti commented on September 28, 2024

Correct. That's the basic idea.
Yes. Maybe rebasing it might be the better option. This would work exactly as you described it.

Would be really great if you plan to share this code as well :)

from fastxml.

ms-ati avatar ms-ati commented on September 28, 2024

I'd like to do this, but I'm not committing to it until I get a look
at how these things are done now.

Based on what I see here in ActiveRecord 3.0.7:
https://github.com/rails/rails/blob/v3.0.7/activerecord/lib/active_record/serializers/xml_serializer.rb

There's clearly a lot more moving parts now, and it looks as though
the code is already using the XmlMini backend to generate tags. I
think that at least some of this functionality is now built into
rails.

It appears that you must configure your XmlMini backend as follows
(http://api.rubyonrails.org/classes/ActiveSupport/XmlMini.html):

ActiveSupport::XmlMini.backend = 'LibXML'

-Marc

On Sat, Jun 4, 2011 at 12:28 PM, rti
[email protected]
wrote:

Correct. That's the basic idea.
Yes. Maybe rebasing it might be the better option. This would work exactly as you described it.

Would be really great if you plan to share this code as well :)

Reply to this email directly or view it on GitHub:
#1 (comment)

Marc Siegel
Technology Specialist
American Technology Innovations

Email: [email protected]
Phone: 617-399-8145
Cell: 617-223-1220
Fax: 267-219-0735

from fastxml.

rti avatar rti commented on September 28, 2024

So that is interesting. Being able to configure the XML backend makes FastXML indeed pointless for RoR 3.x.

from fastxml.

ms-ati avatar ms-ati commented on September 28, 2024

Right, except that I haven't been able to see any speed improvement in
my own benchmarks when I switch out the XmlMini back end.

I posted a question to StackOverflow, and answered it with what I
could discover, here:
http://stackoverflow.com/questions/5891507/does-rti-fastxml-or-anything-like-it-work-with-rails-3-to-speed-up-xml-renderin

From what I could determine, the only thing that had a substantial
effect was using the gem 'fast_xs', which makes part of the encoding
process faster. The XmlMini backends (both LibXML and Nokogiri, which
both use libxml2) seemed to have no effect.

Do you have any thoughts on this?

-Marc

On Sat, Jun 4, 2011 at 1:23 PM, rti
[email protected]
wrote:

So that is interesting. Being able to configure the XML backend makes FastXML indeed pointless for RoR 3.x.

Reply to this email directly or view it on GitHub:
#1 (comment)

from fastxml.

rti avatar rti commented on September 28, 2024

Oh ok, thats indeed disappointing.
No sorry. No idea. Might need some detailed profiling to find out whats consuming the cpu time here.

from fastxml.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.