Skip to content

How do I profile "Loading config file" #611

Answered by oscarotero
iacore asked this question in Q&A
Discussion options

You must be logged in to vote

You can run

const t = performance.now();
console.log(`${t} ms since start!`);

to know the time from Deno's start.
But the dependencies are loaded only once, and then cached.

Another way is using Lume events. For example:

site.addEventListener("beforeBuild", () => console.log(`Prepared to start: ${performance.now()}`);
site.addEventListener("afterLoad", () => console.log(`all files are loaded: ${performance.now()}`);
site.addEventListener("afterRender", () => console.log(`all pages are rendered: ${performance.now()}`);
site.addEventListener("beforeSave", () => console.log(`all processors are runned: ${performance.now()}`);
site.addEventListener("afterBuild", () => console.log(`site build: ${

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@iacore
Comment options

@oscarotero
Comment options

Answer selected by iacore
@iacore
Comment options

@oscarotero
Comment options

@iacore
Comment options

@oscarotero
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants