Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 21 20:01
    ddfreyne commented #1483
  • Jan 21 19:59
    da2x commented #1483
  • Jan 21 19:57
    da2x opened #1483
  • Jan 21 17:24
    joerggollnick commented #1479
  • Jan 21 15:27
    da2x opened #1482
  • Jan 21 07:59
    ddfreyne opened #1481
  • Jan 21 07:58

    ddfreyne on rm-safe-level

    Remove safe_level support in ER… (compare)

  • Jan 21 07:57

    ddfreyne on rm-safe-level

    Remove safe_level support in ERB (compare)

  • Jan 21 00:09
    bobbens edited #1475
  • Jan 20 22:29
    da2x commented #1475
  • Jan 10 07:21
    cdlm commented #1480
  • Jan 10 01:53
    cup edited #1480
  • Jan 10 01:52
    cup opened #1480
  • Jan 08 17:06
    blinry commented #1471
  • Jan 08 11:14
    iay opened #1479
  • Dec 26 2019 10:14
    ddfreyne labeled #1477
  • Dec 26 2019 10:14
    ddfreyne labeled #1478
  • Dec 26 2019 10:14
    ddfreyne closed #1478
  • Dec 26 2019 10:14
    ddfreyne commented #1478
  • Dec 26 2019 03:41
    cup opened #1478
Denis Defreyne
@ddfreyne
I’ve been thinking about what Nanoc-with-components could look like — it’d probably involve revamping the rendering helper significantly.
Andri Möll
@moll
I just use JSX in JavaScript because it's lintable via ESLint, but don't use React. I use JSX on the server side with a few dozen lines to render HTML directly with https://github.com/moll/js-j6pack/. Works far better than the nonsense that is React on the server side.
Denis Defreyne
@ddfreyne
Oh nice — I really like that
Anyway, sleep time!
Andri Möll
@moll
Here's an Estonian site built in that fashion should you want a real life example: https://github.com/rahvaalgatus/rahvaalgatus. The JSX is in views, e.g. https://github.com/rahvaalgatus/rahvaalgatus/blob/master/views/error_page.jsx.
Nightie!
giodestone
@giodestone

should the has_key?("key") work for items in layouts? i.e. @item.has_key?("useImageCarousel") gives me NoMethodError: undefined method `has_key?' for <Nanoc::CompilationItemView identifier=/article-index.html>:Nanoc::CompilationItemView

If it helps its inside of a layout

giodestone
@giodestone
Nevermind, replacing has_key?() with key?() worked...
giodestone
@giodestone
Another rookie mistake key?() takes a :key not a 'string'
Denis Defreyne
@ddfreyne
The difference between symbols (:stuff) and strings in Ruby is so small that it wouldn’t make sense to have both anymore… but that’d involve changing Ruby as a programming language, which is not going to happen soon
Daniel Aleksandersen
@da2x
I’m looking at my nanoc -VV output. Is there any documentation for how to read it? https://pastebin.com/raw/9JACfj7x All the stages adds up to 10 sec, but site still takes 62 sec to compile? What is nanoc doing for the remaining 52 seconds? and how do I troubleshoot the memoization cache misses? (Or is it expected to have a high percentage of misses?) What causes misses? Result doesn’t change with repeated runs and no modified content or layouts.
Denis Defreyne
@ddfreyne
@da2x Most of this stuff is intended for myself to debug potential issues. It’s not documented, because I don’t want people to rely on this exact format and this exact information
@da2x The information in the stages table doesn’t contain all timing information in Nanoc; it only contains compilation itself (excluding loading the site from data sources, exluding preprocessing). This is something I’ve been meaning to change, but I imagine that loading and/or preprocessing is slow in your case, not compilation
The memoization cache misses should be fine. They’re more informative rather than indicating a problem.
Daniel Aleksandersen
@da2x
@ddfreyne ok, I had hoped the data would be more actionable.
My build time has more than doubled and I can’t quite figure out why.
Daniel Aleksandersen
@da2x
What happens after Compiling site…appears on screen and before Stage started: LoadStores when running nanoc -d? There’s where 47 of my missing 52 seconds are spent.
Denis Defreyne
@ddfreyne
@da2x I think that could be preprocessing
Daniel Aleksandersen
@da2x
@ddfreyne puts Time.nowat the start and end of my preprocessing block is only 1 second apart, though.
Denis Defreyne
@ddfreyne
Huh, hmmmm.
@da2x There should be a Stage started: BuildReps — how long does that take?
Daniel Aleksandersen
@da2x
@ddfreyne where should that be?
Denis Defreyne
@ddfreyne
It’ll also be in the output with nanoc -d
Unfortunately the debug output has no timestamps… I guess that would be useful to have
Daniel Aleksandersen
@da2x
Indeed.
@ddfreyne maybe half a second?
I’ve disabled cli output buffering and no line other than "Compiling site…" stays on screen for more than a second or two.
Denis Defreyne
@ddfreyne
@da2x The slowness is even before BuildReps then, correct?
Daniel Aleksandersen
@da2x
@ddfreyne yes, Stage started: LoadStores is the first line after its been stuck onCompiling site… for 47 seconds
Denis Defreyne
@ddfreyne
Does Stage started: BuildReps come after that?
Daniel Aleksandersen
@da2x
Retesting a couple more times, and it seems to be 44 and not 47 seconds, but still. :P it's where the majority of the time is spent.
Compiling site…
Stage started: LoadStores Stage ended: LoadStores
Stage started: CalculateChecksums Stage ended: CalculateChecksums
Stage started: DetermineOutdatedness Stage ended: DetermineOutdatedness
Stage started: ForgetOutdatedDependencies Stage ended: ForgetOutdatedDependencies
Stage started: StorePreCompilationState Stage ended: StorePreCompilationState
Stage started: Prune Stage ended: Prune
Stage started: CompileReps Stage ended: CompileReps
Stage started: StorePostCompilationState Stage ended: StorePostCompilationState
Stage started: Postprocess Stage ended: Postprocess
* Stage started: Cleanup
(etc)
I’m assuming you mean CompileReps?
There is no BuildReps in the output
Denis Defreyne
@ddfreyne
Huh
Which version of Nanoc are you using?
P.S. I have not had coffee yet, so my brain is not entirely powered up
Daniel Aleksandersen
@da2x
4.11.12
Denis Defreyne
@ddfreyne
perfect
Could be interesting to run it through https://github.com/rbspy/rbspy — because off the top of my head I can’t quite tell what is happening
Nanoc has decent instrumentation, but it’s not all-encompassing… some bits are missing
Daniel Aleksandersen
@da2x
did you mean CompileReps or am I missing a —
wait, I’ve logged a couple of the runs.
One of them contains BuildReps.
@ddfreyne it only logs it if there are any modified files.
Denis Defreyne
@ddfreyne
But the slowness is always there, correct?
Daniel Aleksandersen
@da2x
yes, it’s 22 seconds slower when it need to rebuild and those are accounted for by BuildReps. Still leaving 45 seconds between Compiling site and Stage started: LoadStores.
Denis Defreyne
@ddfreyne
Do you have a copy of the site so I can play around with it?
Daniel Aleksandersen
@da2x
@ddfreyne sadly, no. got API keys and stuff littered all through this project.
rbspy doesn’t support any of the ruby versions available in Fedora 31