Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance issue

See original GitHub issue

First of all, thanks for writing this library 😃

We’re running into a performance issue that I wanted to alert you to.

We’re loading a fairly large (~900KB) JSON schema file, parsing it, and running the resulting JavaScript object through this library’s dereference() function. The dereference() call takes around 68 seconds to complete.

We’ve disabled all loading of local or external files, so I don’t think that any of the time spent in dereference() is due to loading external resources.

Here’s basically what the code looks like:

const rawSchema = fetch(...);
const schema = JSON.parse(rawSchema);

if (typeof (schema) !== 'object')
	throw `The schema was not an object.`;

const options = {
	parse: {
		json: false,
		yaml: false,
		text: false,
		binary: false
	resolve: {
		external: false,
		file: false,
		http: false
	continueOnError: false,
	dereference: {
		circular: true


	.dereference(schema, options)
	.then(dereferencedSchema => {

The schema does contain circular references.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

paztiscommented, Oct 20, 2020

found a fix It’s available in my PR: Now performances are really good

paztiscommented, Oct 20, 2020

Sorry bad example, I didn’t pass so much time inside this one. Try to find a better example

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Performance Issues With Grace |
Low Productivity or Late Completion – Make sure you've been clear about the requirements and expectations of the job. · Poor Quality of...
Read more >
9 Examples of a Performance Issue - Simplicable Guide
A performance issue is a failure to meet the basic requirements of a job. They are based on reasonable expectations of behavior and...
Read more >
Dealing with Performance Problems
Types of Performance Problems ; Quantity of work (untimely completion, limited production). Poor prioritizing, timing, scheduling; Lost time ; Quality of work ( ......
Read more >
Top 5 Common Performance Problems - HRCI
Top 5 Common Performance Problems · Shallow Work · Inability to Prioritize · False Sense of Urgency · Productive Procrastination · Low-Quality Output....
Read more >
5 Common Reasons for Performance Issues (Plus 3 Tips to ...
Most Common Causes of Performance Issues · 1. They lack knowledge or skill. · 2. They have unclear or unrealistic expectations. · 3....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found