Comments (4)
Buf bug is fixed.
I'm not sure if hyper >> still works as before because all parallel stuff has now Promises and Supplies.
Simple benchmark should show huge improvement.
from bson.
I've tried Promise approach.
method encode_e_list ( *@p --> Buf ) {
return Buf.new unless @p;
return [~](await do for @p { start { self.encode_element( $_ ) } } );
}
But it deadlocks. For example when encoding hash with 10 keys holding arrays of 10 elements everything works. But hash with 10 keys holding arrays of 20 elements uses all available threads and outer (encoding hash) or inner (encoding array elements) awaits won't complete because they are all half-way started.
I'm not sure what valid solution should look like.
from bson.
A new module BSON::Document is written to handle issues caused by using Hash. The main problem with hashes is changing the input order of key-value pairs. This is handled in the new module. Because it is written in pure perl it is much slower than using hashes which use also nqp.
The module also parallelize the encode and decode processes.
from bson.
After some time running the BSON::Document module I am rather satisfied with it. Perl6's speed has improved in the mean time and will continue to do so. Later I will decide if there can be any code improvements
from bson.
Related Issues (20)
- Documentation outdated - BSON.new is not possible on package. HOT 1
- undefined HOT 2
- Double trouble HOT 2
- Deprecated Code: is_approx HOT 1
- support for timestamp HOT 1
- Rakudo Star 2012.08 test faild HOT 1
- threadpool exhaustion HOT 4
- Support for Decimal128
- encoding/decoding of Num HOT 1
- BSON should convert Rat to Num where possible HOT 1
- Dates created by '$currentDate' are parsed incorrectly HOT 1
- Documents should support destructuring HOT 1
- Test 300-document.t sometimes hangs on document nesting HOT 2
- Switch to native int/num decode methods. HOT 3
- Tests assume PID are below 65536, while it can be much more HOT 4
- Native pack/unpack HOT 2
- Some deprecated code in testing files HOT 2
- Small doubles have problems HOT 1
- Use of Nil in numeric context in block 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 bson.