Commit graph

757 commits

Author SHA1 Message Date
Ferdinand Majerech 10dbb55ed8 Minor documentation and API fixes. 2011-11-18 12:28:29 +01:00
Ferdinand Majerech fbc962623d Simplified the Constructor API. 2011-11-17 23:53:24 +01:00
Ferdinand Majerech ab154480fb Final commit before tha 0.3 release. 2011-11-16 20:41:21 +01:00
Ferdinand Majerech 2c9d464389 Reader was reimplemented.
After experiments with loading the whole file at once, and
with decoding and parsing in separate thread, lazy reader
turned to be the fastest/least memory intensive solution.
Characters are now decoded in small batches.
This improved parsing speed by ~20%.

No global state anymore. Anchors are now zero terminated strings
and TagDirectives are a simple array. Event structure was changed
to prevent size increase.
Minor fixes and improvements.
2011-11-16 03:10:29 +01:00
Ferdinand Majerech f95f0d14c8 Const correctness and minor bugfixes all over the code. 2011-10-30 20:24:43 +01:00
Ferdinand Majerech 8208e817de Updated Node for much more constness (unfortunately, quite some
code duplication as well). No longer need a custom Variant.
2011-10-30 18:12:02 +01:00
Ferdinand Majerech 508696584e More constness in Node. 2011-10-30 10:52:40 +01:00
Ferdinand Majerech b3a51800f7 Removed Node.getToVar as it turned out to be a premature
optimization.
2011-10-29 22:53:46 +02:00
Ferdinand Majerech c385a3ae4d Fixed a documentation bug. 2011-10-29 21:57:36 +02:00
Ferdinand Majerech e835f1a191 Updated Representer API doc, minor documentation changes. 2011-10-29 20:43:30 +02:00
Ferdinand Majerech 0e0113ef0e Moved variant.d to dyaml/std/variant. Profile build doesn't inline anymore (made profiling too difficult). More optimizations, speedup (parsing only). 2011-10-29 18:22:45 +02:00
Ferdinand Majerech be5664a24d Updated D:YAML with DMD 2.056 support. Fixed some bugs.
Found a bug in std.variant and bundled a fixed version.
2011-10-29 00:31:14 +02:00
Ferdinand Majerech 5d35f44416 Nodes now remember their scalar and collection style, although
these are not accessible by the user (as the spec says).
This allows D:YAML to remember styles between loading and
dumping.
2011-10-27 23:13:14 +02:00
Ferdinand Majerech c787531497 Node struct enlarged to 40 bytes. There is no significant
slowdown and a slight memory usage increase. Fixed a potential
bug in Reader. Tag is now implemented as a zero-terminated
string, removing the need for global state.
Node opIndex now returns a reference.
2011-10-26 21:05:56 +02:00
Ferdinand Majerech 6eda5d9d4a Added a profile build target (release with debug symbols).
Release doesn't have debug symbols anymore.
2011-10-26 06:39:06 +02:00
Ferdinand Majerech 60b57ca00d Minor optimizations.
Queue now only adds ranges to the GC if the type allocated has
indirections.
2011-10-26 06:30:10 +02:00
Ferdinand Majerech 62f7e2e4df Optimized dumping performance. Dumping is now about half as fast
as loading. Also slightly improved loading performance.
Greatly improved performance with very small files. We can now
load 10000 24 byte files in a second, and dump them at the same
speed.
Fixed another FastCharSearch bug.
2011-10-25 20:23:44 +02:00
Ferdinand Majerech 8b995e5061 Fixed a bug in FastCharSearch.
Reader buffer is now manually allocated, decreasing GC workload
even further.
2011-10-25 00:16:43 +02:00
Ferdinand Majerech 97bdf819fa Replaced possibleSimpleKeys associative array in Scanner with an
ordinary array, added a mixin to generate fast lookup tables for
character search, and used said mixin in the greatest
bottlenecks. Another great speedup, at least 20%, can't keep
track of it anymore.
2011-10-24 20:36:26 +02:00
Ferdinand Majerech 97693b4417 Got rid of most UTF-8 decoding that took a lot of time.
Removed unnecessary calls to Stream.available(),
again for grat speed gain. Also various small optimizations.
Overall, improved loading speed about 400%.
2011-10-24 00:46:35 +02:00
Ferdinand Majerech 9d68b6fa9a Optimized GC performance when loading,
greatly decreasing memory usage and
improving speed by 30% or more.
2011-10-23 20:17:37 +02:00
Ferdinand Majerech 915428c8ed CDC and yaml_bench makefile now always compile with debug
symbols. yaml_bench can now repeat the benchmark many times in a
single run. yaml_gen can now disable collection keys in mappings.
2011-10-23 16:10:27 +02:00
Ferdinand Majerech 13ea5f0c24 Added a shortcut alias called "as" for Node.get(), and replaced
get() with as() all over the code, tutorials, examples and docs.
Fixed a bug in YAML benchmark makefile.
Fixed a bug in autoddoc configuration.
2011-10-22 17:06:32 +02:00
Ferdinand Majerech fb67e775e4 Added a YAML benchmark that loads and optionally extracts data
from and/or dumps a YAML file.
2011-10-22 16:20:06 +02:00
Ferdinand Majerech 3078262129 Fixed an Emitter bug which caused tags to always be emitted in
full format.
Specified field names for the tag directive tuple to make code
more readbvle.
Fixed a bug in Dumpler.tagDirectives documentation example.
2011-10-22 11:18:57 +02:00
Ferdinand Majerech 1f2243190f Added a random YAML generator to serve as an example and for
benchmarking.
2011-10-22 00:24:29 +02:00
Ferdinand Majerech 7402d8f827 Fixed Makefile of the yaml_stats example.
Fixed a bug in Node that caused an empty exception message.
2011-10-21 20:40:37 +02:00
Ferdinand Majerech f726ff0b94 Added an example application that displays statistics about YAML
documents.
2011-10-20 23:20:02 +02:00
Ferdinand Majerech d5a063930d Clarified Node documentation.
Fixed a bug that caused errors when loading documents with YAML
version directives.
2011-10-20 20:01:52 +02:00
Ferdinand Majerech a87d618732 Examples' Makefiles now have a clean target. 2011-10-20 15:51:31 +02:00
Ferdinand Majerech 33a376b038 String representation of a Node's tag can now be accessed by the
user.
2011-10-20 15:48:21 +02:00
Ferdinand Majerech fb814c66c2 Implemented a simple Queue data structure, until Phobos has a
replacement. Tokens are not immutable anymore.
2011-10-20 10:34:34 +02:00
Ferdinand Majerech 595302fbff Bumped version strings to 0.3 so it won't get forgotten later. 2011-10-18 21:46:05 +02:00
Ferdinand Majerech 2cd2de44ff Updated Constructor API documentation with examples. 2011-10-18 21:40:37 +02:00
Ferdinand Majerech 93b66da54c Added a Resolver example to the API documentation. 2011-10-18 16:29:16 +02:00
Ferdinand Majerech 8ad650e089 Cleaned up exceptions and their messages.
Some minor dog fixes.
2011-10-18 16:12:22 +02:00
Ferdinand Majerech 009017eef0 Simplified the Constructor and Resolver example -
no need for range checks as they are handled in Node itself.
2011-10-17 13:13:02 +02:00
Ferdinand Majerech 548480b06b Changed the Constructor API (for loading of custom types) to
make it easier to load custom classes/structs. Updated API docs,
tutorials and examples accordingly.
2011-10-17 12:53:38 +02:00
Ferdinand Majerech 5547f62176 Final changes for the 0.2 release (hopefully). 2011-10-15 18:28:34 +02:00
Ferdinand Majerech 210091a75f Fixed a bug which prevented dumping to file. Updated tutorials
and example with new information.
2011-10-15 16:31:23 +02:00
Ferdinand Majerech 23290239a7 There should be no problem constructing new instances of Tag,
Anchor and TagDirectives in separate threads anymore. D:YAML
still is not thread safe itself, though (it's the user's
responsibility to handle synchronization when working with a
single node from two threads, for example).
2011-10-14 19:54:41 +02:00
Ferdinand Majerech 765b74ffca Updated the API documentation.
Updated examples based on the new Loader API.
(Dumper API still needs examples)
2011-10-14 10:34:53 +02:00
Ferdinand Majerech 21001b36b9 Got rid out dyaml.util . Was never a good idea, the functions
were not trivial to understand. For now, we just use canFind
with strings in scanner and emitter.
2011-10-13 22:04:37 +02:00
Ferdinand Majerech 8360da733d All YAML exceptions now keep track of file and line they've been
thrown at, making debugging easier.
2011-10-13 11:30:14 +02:00
Ferdinand Majerech 34b11405d4 Implemented the resolver unittest.
Changed Loader API to be in line with Dumper,
and updated examples, tutorials and docs.
2011-10-12 23:49:42 +02:00
Ferdinand Majerech 934df763ad Most of emitter work done. There are some more changes left until 0.2,
and the turorials and documentation still need some updating.
2011-10-11 15:58:23 +02:00
Ferdinand Majerech 967fe8c48b Added various node manipulation functions so e.g. new elements
can be added to collections before emitting. The code is
somewhat ugly, might be revised later.
2011-08-21 23:53:19 +02:00
Ferdinand Majerech b0f2ce201a Added Node constructors needed to create new nodes to emit. 2011-08-21 03:56:21 +02:00
Ferdinand Majerech 2c230751d2 Added support for null tag structs (used in parsing), using
the Tag struct throughout the code. Event struct size decreased
to 48 bytes.
2011-08-21 00:07:32 +02:00
Ferdinand Majerech dde7d2f64f Node equality test now takes tag into account, as the
specification requires.
2011-08-20 22:38:32 +02:00