Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 8.1.10 - Apr 20 2026

- Performance: `HtmlCharRefs` entity lookup now uses a `Dictionary<string, string>` instead of an F# `Map`, giving O(1) lookups instead of O(log n) for ~2230 HTML named-entity entries. Also avoids a repeated `char[]` allocation in the `TrimEnd` call inside the active pattern.

## 8.1.9 - Apr 18 2026

- Fix: `Caching.hashString` now disposes the `SHA1` instance after use; on .NET 5+ uses `SHA1.HashData` (static, pool-backed) to avoid allocation entirely (PR #1745)
Expand Down
8 changes: 4 additions & 4 deletions src/AssemblyInfo.Csv.Core.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.Csv.Core")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.Csv.Core"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.DesignTime.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.DesignTime")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.DesignTime"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.Html.Core.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.Html.Core")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.Html.Core"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.Http.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.Http")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.Http"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.Json.Core.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.Json.Core")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.Json.Core"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.Runtime.Utilities.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.Runtime.Utilities")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.Runtime.Utilities"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.WorldBank.Core.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.WorldBank.Core")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.WorldBank.Core"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.Xml.Core.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data.Xml.Core")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data.Xml.Core"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
8 changes: 4 additions & 4 deletions src/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("FSharp.Data")>]
[<assembly: AssemblyProductAttribute("FSharp.Data")>]
[<assembly: AssemblyDescriptionAttribute("Library of F# type providers and data access tools")>]
[<assembly: AssemblyVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.9.0")>]
[<assembly: AssemblyVersionAttribute("8.1.10.0")>]
[<assembly: AssemblyFileVersionAttribute("8.1.10.0")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FSharp.Data"
let [<Literal>] AssemblyProduct = "FSharp.Data"
let [<Literal>] AssemblyDescription = "Library of F# type providers and data access tools"
let [<Literal>] AssemblyVersion = "8.1.9.0"
let [<Literal>] AssemblyFileVersion = "8.1.9.0"
let [<Literal>] AssemblyVersion = "8.1.10.0"
let [<Literal>] AssemblyFileVersion = "8.1.10.0"
23 changes: 19 additions & 4 deletions src/FSharp.Data.Html.Core/HtmlCharRefs.fs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
namespace FSharp.Data

open System
open System.Collections.Generic
open System.Globalization

module internal HtmlCharRefs =

let private refs =
// Avoid a new char[] allocation on every TrimEnd call
let private semiColonChars = [| ';' |]

// ~2230 HTML named-entity entries; stored as a Dictionary for O(1) lookup
let private refsEntries =
[| "&Aacute;", "\u00C1"
"&Aacute", "\u00C1"
"&aacute;", "\u00E1"
Expand Down Expand Up @@ -2237,10 +2242,17 @@ module internal HtmlCharRefs =
"&zscr;", "\uD835\uDCCF"
"&zwj;", "\u200D"
"&zwnj;", "\u200C" |]
|> Map.ofArray

let private refs =
let d = Dictionary<string, string>(refsEntries.Length, StringComparer.Ordinal)

for k, v in refsEntries do
d.[k] <- v

d

let (|Number|Lookup|) (orig: string) =
let s = orig.TrimEnd([| ';' |])
let s = orig.TrimEnd(semiColonChars)

if s.Length > 2 then
let (delimeters, discriminator) =
Expand Down Expand Up @@ -2275,4 +2287,7 @@ module internal HtmlCharRefs =
string lead + string tail
else
string (char num)
| Lookup(ref) -> defaultArg (refs.TryFind ref) ref
| Lookup(ref) ->
match refs.TryGetValue(ref) with
| true, v -> v
| false, _ -> ref
Loading