itinero / reminiscence Goto Github PK
View Code? Open in Web Editor NEWA library for cross-platform memory mapping.
License: MIT License
A library for cross-platform memory mapping.
License: MIT License
I'm trying to add an edge meta data value but I get and exception "Collection is readonly".
May be I make mistake, what is the right way to add a meta data value to one or more edges?
following my snippet:
foreach (var vertex in GetVerticesByCircle(network, latitude[0], longitude[0], radius))
{
edgeEnumerator.MoveTo(vertex);
while (edgeEnumerator.MoveNext())
{
var edgeData = edgeEnumerator.Data;
var metaData = routerDb.EdgeMeta.Get(edgeData.MetaId);
metaData.AddOrReplace("custom", "5000");
}
}
These lines use _arrayPow
, which looks like it was supposed to be the log-base-2 of the block size, but it's never actually set except inline, so if you try to use a smaller block size then there will be some values that can only be written to (never read from).
For example:
var arr = new MemoryArray<int>(17, 16);
arr[15] = 1;
Console.WriteLine(arr[15]); // writes 1
arr[16] = 2;
Console.WriteLine(arr[16]); // throws
A few classes implement System.IDisposable
, but they do so without using the standard pattern. See CA1063:ImplementIDisposableCorrectly, including its "See Also" links, for a description of this pattern.
I'm wrapping up what I intend to submit for the native memory array implementation, and in my self-review, I noticed that I don't have a finalizer on the type, which got me thinking about this.
The types I see that directly implement System.IDisposable
are:
Reminiscence.Arrays.ArrayBase<T>
Reminiscence.Collections.List<T>
Reminiscence.Indexes.Index<T>
Reminiscence.IO.MemoryMap
Reminiscence.IO.MappedAccessor<T>
Related to:
Create an index-object mapping variable-sized objects to long id's.
The projects use the .xproj
/ project.json
format from the VS2015 preview era, so they can't be used directly with VS2017. VS2017's auto-upgrade process, however, doesn't seem to understand what you're doing here, and the upgraded project won't build.
My VS2015 is broken at the moment (reinstalling doesn't work), so I can't confirm that I can get it working in that version, but it looks like you've set a precedent by upgrading itinero/routing, so I feel OK requesting this.
Here's the MSBuild detailed output from trying to build the auto-upgraded version, in case that helps you figure this out.
Add IEnumerable to arrays. We can do this by just adding it to the array base class.
We are busy rebuilding the routerdbs for many countries of the world. Its the first time since a couple of years so I don't remember anymore, how it went that time.
Anyway, now its Itinero 1.6.0-pre032, Reminiscence 1.3.0. with a Windows App x64.
For example germany-latest.osm.pbf. routerDb.LoadOsmData() is an hour, thats acceptable.
Then routerDb.AddContracted() with standard-profiles Car, Bicycle and Walking. 12-15h each.
Will take us month to compile all the countries.
The machine is a I5 3.3GHz with 32G ram. CPU load is around 40% and memory consumption ca 20GB.
Network load is 0% so I believe, its ok, if the PBF is on a NAS? Everything is done in Memory?
Maybe we are doing something wrong or missing something? Would be great if there is a trick to speed up.
Spun off from #7.
From @xivk:
@airbreather Any ideas on improving this library, that can use a lot of work to be honest are very welcome. There is also this:
I'm preparing work on v2 so it's the right time to make big changes.
Support netstandard2.1 and all the goodies we can use in this library for that. See also #11
https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.1.md
Create an array with variable-sized elements using:
This line explicitly allows a block size of zero, but that doesn't really work here since there's no finite number of such blocks that can satisfy any requested length.
From a quick search, the other Itinero projects don't look like they ever provide a different block size, so this probably doesn't affect anyone right away.
Enable indexes to become writable again by giving it a new map to extend to. At the moment the indexes that have been created from a stream are read-only, they need to become writable again and this can be done by giving them a new map.
This is needed to fix this issue: itinero/routing#146
I noticed master
is still the default branch on this repo.
Refactor the accessors or add another concept next to them. We need to be able to create a reader/write per type without giving it a stream.
This to support the copy-to operation for example:
https://github.com/itinero/reminiscence/blob/develop/src/Reminiscence/Extensions.cs#L41
With the current API we need to create an accessor with a stream that is never used.
Implement support for boolean arrays where one bit represents on bool.
We need to make breaking changes because this would make the elementsize < 1 byte.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.