Code Monkey home page Code Monkey logo

Comments (8)

xeipuuv avatar xeipuuv commented on September 3, 2024

Performance depends on many factors. How do you load your documents and schema ?
how do you perform the validations ? what kind of loaders are you using ? etc...
Showing some code would help.

from gojsonschema.

wizard580 avatar wizard580 commented on September 3, 2024

First of all: Validated 1000 jsons in 1.53061351s (may be I'm wrong and it's good result). It result for failed json, but I can test for passed too.

short example:
dataSchema,_ = jsonschema.NewSchema( jsonschema.NewReferenceLoader("file://"+ *dataSchemaFile) )
for {
dat := jsonschema.NewStringLoader("some long json string")
res,_ := dataSchema.Validate(dat)
}

from gojsonschema.

xeipuuv avatar xeipuuv commented on September 3, 2024

So that's 1.5 ms for each JSON. Is that too slow ?

from gojsonschema.

wizard580 avatar wizard580 commented on September 3, 2024

I look at https://github.com/ebdrup/json-schema-benchmark
current validation little better than "jsck"

from gojsonschema.

xeipuuv avatar xeipuuv commented on September 3, 2024

There is always room for improvement and i guess it also depends a lot on the input document and schema.

from gojsonschema.

wizard580 avatar wizard580 commented on September 3, 2024

Yes, I know.
So I try to dig in and look what places can be improved and ask a for a place where I can look first. Or just do as I can.

from gojsonschema.

xeipuuv avatar xeipuuv commented on September 3, 2024

Then its better to use go profiling tools, it will give you real results without having to look for yourself.

from gojsonschema.

wizard580 avatar wizard580 commented on September 3, 2024

Oh, yes. I'm not profi at Go, so don't remember all tools.
Thanks for hint.

from gojsonschema.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.