Comments (5)
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.
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.
the broken ldp
gem is: https://rubygems.org/gems/ldp (client) rather than rdf-ldp
(server)
from rdf.
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.
Resolved via #430 and released in version 3.2.2.
from rdf.
Related Issues (20)
- RDF::NTriples::Reader does not `require 'strscan'` HOT 3
- Ruby 2.7.1, URI.decode is obsolete
- bad behaviour in RDF::List HOT 7
- blank nodes reuse memory addresses, causing problems for persistent stores HOT 3
- Is there a "prettier" HOT 1
- Is there a more 'elegant' way to do this? HOT 3
- Strange "file missing" error with 3.1.14 release HOT 6
- Comparing two repositories HOT 2
- Verbose warnings on 2.7+ Ruby HOT 2
- Is it possible to change the standard prefixes? HOT 7
- docmentation: how to create new vocabs, and langage-tagged strings in vocabs HOT 3
- Weird `require 'enumerator'` issue caused by this gem HOT 5
- change from DateTime < Literal to DateTime < Temporal breaks downstream customization HOT 5
- Invalid argument @ rb_sysopen - (Errno:EINVAL) when using local files on Windows HOT 10
- RDF::Vocabulary.find on RDF vocab returns RDF class HOT 5
- Ruby regexp warning: character class has duplicated range HOT 10
- Errno::EINVAL using `each_statement` with a LARGE, local NTriples file HOT 1
- RDF::Query#graph_name does not behave has documented HOT 3
- Error when using local files on Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rdf.