GithubHelp home page GithubHelp logo

Comments (5)

gkellogg avatar gkellogg commented on June 2, 2024 1

The SerializedTransaction implementation hasn't changed, it's the default implementation uses regular hashes, rather than Hamster hashes.

The performance implications mostly come down to the relative implementations of #insert_to:

Using Ruby hash:

data          = data.has_key?(c)       ? data.dup       : data.merge(c => {})
data[c]       = data[c].has_key?(s)    ? data[c].dup    : data[c].merge(s => {})
data[c][s]    = data[c][s].has_key?(p) ? data[c][s].dup : data[c][s].merge(p => {})
data[c][s][p] = data[c][s][p].merge(o => statement.options)

Using Hamster:

return data.put(c) do |subs|
  (subs || Hamster::Hash.new).put(s) do |preds|
    (preds || Hamster::Hash.new).put(p) do |objs|
      (objs || Hamster::Hash.new).put(o, statement.options)
    end
  end
end

I haven't benchmarked it.

I'll add both 'ldp' and and active-triples to my local set to run against.

I presume you're good to do a 3.2.2 release of RDF.rb

from rdf.

gkellogg avatar gkellogg commented on June 2, 2024

The hamster impl is on the rdf-hamster-repo gem now, but SerializedTransaction is more generally useful (including for rdf-ordered-repo and the built in implementation). That fact that there is apparently a dependency in ActiveTriples shows this.

rdf-ldp seems to work okay as is, based on the specs passing, anyway.

I’ll create an alias.

from rdf.

no-reply avatar no-reply commented on June 2, 2024

the broken ldp gem is: https://rubygems.org/gems/ldp (client) rather than rdf-ldp (server)

from rdf.

no-reply avatar no-reply commented on June 2, 2024

thanks for your help!

confirming that a release with #430, in the 3.x series will fix the relevant downstream builds.

off the cuff, any guess what i should expect as concerns performance for the new SerializedTransaction implementation? i'm trying to decide whether ActiveTriples needs to add the hamster dependency back, and if so what the best way to inject that as the default repository for its users will be.

from rdf.

gkellogg avatar gkellogg commented on June 2, 2024

Resolved via #430 and released in version 3.2.2.

from rdf.

Related Issues (20)

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.