@@ -32,6 +32,7 @@ const hash = createHash('sha256');
3232hash . update ( fs . readFileSync ( '../../pnpm-lock.yaml' , 'utf-8' ) ) ;
3333hash_graph ( hash , fileURLToPath ( import . meta. url ) ) ;
3434const digest = hash . digest ( ) . toString ( 'base64' ) . replace ( / \/ / g, '-' ) ;
35+ console . log ( 'hash is' , digest ) ;
3536
3637/**
3738 * Utility function to work with code snippet caching.
@@ -84,6 +85,8 @@ async function create_snippet_cache() {
8485 if ( fs . existsSync ( file ) ) {
8586 snippet = fs . readFileSync ( file , 'utf-8' ) ;
8687 cache . set ( source , snippet ) ;
88+ } else {
89+ console . log ( 'cache miss' ) ;
8790 }
8891 }
8992
@@ -192,7 +195,9 @@ export async function render_content_markdown(
192195 const headings : string [ ] = [ ] ;
193196 const { check = true } = options ?? { } ;
194197
195- return await transform ( body , {
198+ const time = Date . now ( ) ;
199+
200+ const res = await transform ( body , {
196201 async walkTokens ( token ) {
197202 if ( token . type === 'code' ) {
198203 if ( snippets . get ( token . text ) ) return ;
@@ -316,6 +321,11 @@ export async function render_content_markdown(
316321 return `<blockquote>${ content } </blockquote>` ;
317322 }
318323 } ) ;
324+
325+ if ( ! filename . startsWith ( '<two' ) )
326+ console . log ( 'rendering ' , filename , 'took' , Date . now ( ) - time , 'ms' ) ;
327+
328+ return res ;
319329}
320330
321331/**
0 commit comments