Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging fork into trunk #359

Merged
merged 113 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
47a2b91
Create pull_request.yml
oformaniuk Mar 15, 2020
54d3f1e
Create ci.yml
oformaniuk Mar 15, 2020
8311487
Create release.yml
oformaniuk Mar 15, 2020
8eae468
Update pull_request.yml
oformaniuk Mar 15, 2020
942420f
Add `Handlebars.Code.sln`
Mar 16, 2020
d7e3c11
Update pull_request.yml
oformaniuk Mar 16, 2020
cfea4b0
Update pull_request.yml
oformaniuk Mar 16, 2020
53e0109
Add netcoreapp3.1
oformaniuk Mar 16, 2020
c8f5ccc
Update pull_request.yml
oformaniuk Mar 16, 2020
b8b548b
Fix tests
oformaniuk Mar 16, 2020
e367f9e
Update ci.yml
oformaniuk Mar 17, 2020
5ab7eb3
Merge pull request #2 from zjklee/feature/pipelines
oformaniuk Apr 23, 2020
2f09a18
Support for BlockParams
Jan 7, 2020
4669550
Support for `ReturnHelper`
Jan 18, 2020
7b68b87
Further improvements
Mar 3, 2020
ec4ce77
Extreme refactoring/enhancements
oformaniuk Apr 23, 2020
b1c4901
Update readme
oformaniuk Apr 23, 2020
1165fa2
Update `Handlebars.Code.sln`
oformaniuk Apr 23, 2020
26a1a8b
Add performance results
oformaniuk Apr 23, 2020
380fe48
Fixing problems + improvements
oformaniuk Apr 24, 2020
294958e
Fix repack
oformaniuk Apr 24, 2020
17b0d43
Remove path segment cache
oformaniuk Apr 24, 2020
34d9256
Add extra test steps
oformaniuk Apr 24, 2020
dbf2d06
WIP: try disable FastCompile
oformaniuk Apr 24, 2020
4980f86
Fix SonarCloud comments
oformaniuk Apr 24, 2020
9683df9
Exclude `CompileFast` for Linux and MacOS
oformaniuk Apr 24, 2020
cb466f7
Make `sonar` actions back to Linux VMs
oformaniuk Apr 24, 2020
cc9b8f6
Merge pull request #3 from zjklee/hard-fork
oformaniuk Apr 24, 2020
4754191
Update README.md
oformaniuk Apr 24, 2020
a8c46f1
Fix `ILRepack` problem on build/pack
oformaniuk Apr 24, 2020
f3423fc
Fix publish
oformaniuk Apr 24, 2020
c8c8d67
Fix packaging
oformaniuk Apr 24, 2020
3a4f8fa
Remove `InternalsVisible` attribute
oformaniuk Apr 27, 2020
f8b699c
Merge pull request #5 from zjklee/fix/internalsvisible
oformaniuk Apr 27, 2020
bfcac83
Set dummy token for PR action
oformaniuk May 17, 2020
92d5bb1
Set real token
oformaniuk May 17, 2020
0b40d46
Remove release notes
oformaniuk May 17, 2020
5af777f
Merge pull request #9 from zjklee/feature/tokenless-sonar
oformaniuk May 17, 2020
8204633
Fix `value` variable leaking from `BindingContext`
oformaniuk May 18, 2020
ec849bd
Merge pull request #10 from zjklee/issues/7
oformaniuk May 18, 2020
ae3a40d
Fix code coverage
oformaniuk May 18, 2020
a4c3c39
Merge pull request #11 from zjklee/fix/code-coverage
oformaniuk May 18, 2020
d0270f1
Fix code coverage
oformaniuk May 18, 2020
93d51a9
Merge pull request #12 from zjklee/fix/code-coverage
oformaniuk May 18, 2020
58b6a7d
Fix CompileFast for Unix
oformaniuk May 18, 2020
e9f254e
Remove unused `using`
oformaniuk May 19, 2020
6b13c17
Update Readme with extensions info
oformaniuk May 19, 2020
2ae0d46
Merge pull request #13 from zjklee/fix/compile-fast
oformaniuk May 19, 2020
02c1370
Overload for CreateWriterView for CreateView
May 16, 2020
7f822b4
Cleaned up test for cleaner pr
May 16, 2020
b5ef30d
Implement `ViewReaderFactory` approach
oformaniuk May 30, 2020
a40e0ff
Merge pull request #8 from fhogberg/create-view-with-writer-output
oformaniuk May 30, 2020
e700983
Improve memory usage and performance
oformaniuk May 24, 2020
ec7a51c
Add Array.Empty polyfill, add Logger tests
oformaniuk May 30, 2020
2462b02
Remove unused method
oformaniuk May 30, 2020
726d481
Decrease code duplication
oformaniuk May 30, 2020
b183441
Merge pull request #14 from zjklee/feature/improve-perf
oformaniuk May 30, 2020
55965c4
Add test for the issue
oformaniuk May 30, 2020
c8f17e0
Merge pull request #17 from zjklee/issue/rexm/351
oformaniuk May 30, 2020
7b4aed9
Fix passing context to `helper`s
oformaniuk May 31, 2020
c532953
Change CI NuGet version approach
oformaniuk May 31, 2020
a245e02
Update issue templates
oformaniuk May 31, 2020
e90d908
Disable package publishing on each push to `master`
oformaniuk May 31, 2020
3273478
Update issue templates
oformaniuk May 31, 2020
2c28fcf
Implement proper late binding for Helpers
oformaniuk Jun 1, 2020
a73fb5f
Add tests for Helper late binding
oformaniuk Jun 1, 2020
470743c
Merge pull request #20 from zjklee/feature/late-bind-helper-priority
oformaniuk Jun 2, 2020
339b6ea
Remove `Obsolete` attributes from `RegisterHelper`
oformaniuk Jun 3, 2020
767ef5d
Support .NET 4.5.1
StefH Jun 9, 2020
635bd4a
Update `dotnet-sonarscanner` action version
oformaniuk Jun 10, 2020
eb0f9e7
Merge pull request #24 from StefH/stef_net451
oformaniuk Jun 11, 2020
10ad2bd
Helpers arguments should always be resolved as values not helpers
oformaniuk Jun 11, 2020
e173362
Merge pull request #25 from zjklee/fix/helper-args-always-values
oformaniuk Jun 11, 2020
f060c3c
Update Readme
oformaniuk Jun 11, 2020
f4cadea
Fix packaging for `net451`
oformaniuk Jun 11, 2020
a078ac8
Update README.md
oformaniuk Jun 11, 2020
7cd7186
Simplify CI; reduce dependencies
oformaniuk Jun 12, 2020
1b33f73
Add missing file
oformaniuk Jun 12, 2020
2871f0a
Fix SonarCloud issues; fix tests on Unix
oformaniuk Jun 12, 2020
4ac1734
Split Unix tests to separate jobs
oformaniuk Jun 12, 2020
88813cb
Specify test project directly
oformaniuk Jun 12, 2020
7622486
Remove Unix tests for net core 2.1
oformaniuk Jun 12, 2020
86f6a72
Merge pull request #28 from zjklee/feature/update-ci
oformaniuk Jun 12, 2020
072086d
Configuration for bobvanderlinden/probot-auto-merge
oformaniuk Jun 12, 2020
81bab9c
Merge pull request #29 from zjklee/feature/auto-merge
oformaniuk Jun 12, 2020
4b577ce
Implement `MissingHelper` feature
oformaniuk Jun 1, 2020
881516c
Implement `BlockHelperMissing`
oformaniuk Jun 12, 2020
03732ca
Fix package refs for net45*
oformaniuk Jun 12, 2020
d9cac02
Fix `HelperToReturnHelperAdapter`
oformaniuk Jun 12, 2020
371010d
Expose `IReadOnlyPathInfoStore`
oformaniuk Jun 12, 2020
894481f
Merge pull request #21 from zjklee/feature/missingHelper
probot-auto-merge[bot] Jun 12, 2020
92f267c
Configure `Release Drafter`
oformaniuk Jun 13, 2020
29c9f67
Merge pull request #30 from zjklee/feature/release-drafter
probot-auto-merge[bot] Jun 13, 2020
0971074
Reference Release notes from NuGet
oformaniuk Jun 13, 2020
5ea4b9b
Configure todo-bot
oformaniuk Jun 13, 2020
d42494c
Merge pull request #31 from zjklee/feature/todo-bot
probot-auto-merge[bot] Jun 13, 2020
5820bcf
Added feature toggle to support legacy helpers naming
oformaniuk Jun 17, 2020
e28fc14
Update readme
oformaniuk Jun 17, 2020
44a0e36
Merge pull request #33 from zjklee/feature/legacy-helper-naming
oformaniuk Jun 18, 2020
515b74a
Fix index increment for Enumerable data
oformaniuk Jul 6, 2020
8244de5
Merge pull request #35 from zjklee/issues/34
oformaniuk Jul 6, 2020
48a52b2
Reduce noise
oformaniuk Sep 4, 2020
66d4976
Remove non-Core projects for later evaluation
oformaniuk Sep 4, 2020
4164119
Remove some non-code files
oformaniuk Sep 4, 2020
1baf0bf
Remove GitHub integrations
oformaniuk Sep 4, 2020
9ef1108
Update `csproj`s and `props` files
oformaniuk Sep 5, 2020
8b65e88
Update README.md
oformaniuk Sep 5, 2020
ed74f45
Remove some more noisy changes
oformaniuk Sep 5, 2020
5d9267d
Fix Readme
oformaniuk Sep 24, 2020
a83a191
Merge branch 'master' into master
oformaniuk Oct 9, 2020
ecf5212
Merge branch 'master' into master
oformaniuk Oct 10, 2020
2adf1b2
Merge branch 'master' into master
oformaniuk Oct 11, 2020
7e84c60
Revert icon
oformaniuk Oct 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

42 changes: 39 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,42 @@ The animal, Fido, is a dog.
The animal, Chewy, is not a dog.
*/
```

### Compatibility feature toggles

Compatibility feature toggles defines a set of settings responsible for controlling compilation/rendering behavior. Each of those settings would enable certain feature that would break compatibility with canonical Handlebars.
By default all toggles are set to `false`.

##### Legend
- Areas
- `Compile-time`: takes affect at the time of template compilation
- `Runtime`: takes affect at the time of template rendering

#### `RelaxedHelperNaming`
If `true` enables support for Handlebars.Net helper naming rules.
This enables helper names to be not-valid Handlebars identifiers (e.g. `{{ one.two }}`).
Such naming is not supported in Handlebarsjs and would break compatibility.

##### Areas
- `Compile-time`

##### Example
```c#
[Fact]
public void HelperWithDotSeparatedName()
{
var source = "{{ one.two }}";
var handlebars = Handlebars.Create();
handlebars.Configuration.Compatibility.RelaxedHelperNaming = true;
handlebars.RegisterHelper("one.two", (context, arguments) => 42);

var template = handlebars.Compile(source);
var actual = template(null);

Assert.Equal("42", actual);
}
```

## Performance

### Compilation
Expand All @@ -166,16 +202,16 @@ Compared to rendering, compiling is a fairly intensive process. While both are s
Nearly all time spent in rendering is in the routine that resolves values against the model. Different types of objects have different performance characteristics when used as models.

#### Model Types
- The absolute fastest model is a dictionary (microseconds), because no reflection is necessary at render time.
- The absolute fastest model is a `IDictionary<string, object>` (microseconds).
- The next fastest is a POCO (typically a few milliseconds for an average-sized template and model), which uses traditional reflection and is fairly fast.
- Rendering starts to get slower (into the tens of milliseconds or more) on dynamic objects.
- The slowest (up to hundreds of milliseconds or worse) tend to be objects with custom type implementations (such as `ICustomTypeDescriptor`) that are not optimized for heavy reflection.

A frequent performance issue that comes up is JSON.NET's `JObject`, which for reasons we haven't fully researched, has very slow reflection characteristics when used as a model in Handlebars.Net. A simple fix is to just use JSON.NET's built-in ability to deserialize a JSON string to an `ExpandoObject` instead of a `JObject`. This will yield nearly an order of magnitude improvement in render times on average.
~~A frequent performance issue that comes up is JSON.NET's `JObject`, which for reasons we haven't fully researched, has very slow reflection characteristics when used as a model in Handlebars.Net. A simple fix is to just use JSON.NET's built-in ability to deserialize a JSON string to an `ExpandoObject` instead of a `JObject`. This will yield nearly an order of magnitude improvement in render times on average.~~

## Future roadmap

**[Call for Input on v2](https://github.com/rexm/Handlebars.Net/issues/294)**
TBD

## Contributing

Expand Down
22 changes: 0 additions & 22 deletions appveyor.yml

This file was deleted.

Loading