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

add nested getindex to precompile #271

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

oscardssmith
Copy link
Contributor

The top level getindex is get(obj::JSON3.Object{Vector{UInt8}, Vector{UInt64}}, key), but a nested getindex will be using a subarray so it needs different compilation. get(obj::JSON3.Object{Vector{UInt8}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}, key

The top level getindex is `get(obj::JSON3.Object{Vector{UInt8}, Vector{UInt64}}, key)`, but a nested getindex will be using a subarray so it needs different compilation.  `get(obj::JSON3.Object{Vector{UInt8}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}}, key`
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.12% ⚠️

Comparison is base (717406d) 89.61% compared to head (e11e475) 89.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #271      +/-   ##
==========================================
- Coverage   89.61%   89.49%   -0.12%     
==========================================
  Files          10       10              
  Lines        1820     1819       -1     
==========================================
- Hits         1631     1628       -3     
- Misses        189      191       +2     
Files Changed Coverage Δ
src/workload.jl 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@quinnj
Copy link
Owner

quinnj commented Sep 21, 2023

Ope, it looks like the Documenter 1.0 release is breaking my docs, so I'll fix that separately. Merging.

@quinnj quinnj merged commit 0480e3f into quinnj:main Sep 21, 2023
5 of 7 checks passed
@oscardssmith oscardssmith deleted the patch-1 branch September 21, 2023 21:33
@oscardssmith
Copy link
Contributor Author

hmm. There still seems to be about a 67ms delay for the first getindex. MWE is

using JSON3
str = """{
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                    "GlossTerm": "Standard Generalized Markup Language",
                    "Acronym": "SGML",
                    "Abbrev": "ISO 8879:1986",
                    "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                        "GlossSeeAlso": ["GML", "XML"]
                    },
                    "GlossSee": "markup"
                }
            }
        }
    }
}"""
data = JSON3.read(IOBuffer(str));
data[:glossary][:title]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants