in reply to Dumping compact YAML
You have posted two questions today that seem concerned with "heaviness" - this node and Counting line of code. Unless you are working with a large number of records (100K and up) and have very, very tight memory, disk-space, bandwidth, or interprocess communication constraints (e.g. realtime applications), saving a few whitespace characters is not going to make much difference to the speed or efficiency of your program. In the example above you saved a grand total of 10 characters or (N*4)-2 where N is the number of items in your list.
Perhaps you could share with us the reason this is an issue for you? It might help us do a better of job of suggesting solutions.
Even if you have a very good reason for being concerned about space or format, I caution you about using JSON in place of YAML. Despite claims that JSON is a subset of YAML there are some important and potentially significant differences between the two. Please see Re: Caching or using values across multiple programs for details.
Best, beth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dumping compact YAML
by dgaramond2 (Monk) on Jul 21, 2009 at 14:04 UTC | |
by Fletch (Bishop) on Jul 21, 2009 at 15:50 UTC |