simplajs / simpla-paths

Structure Simpla content in code with new HTML attributes
https://www.simplajs.org
MIT License
6 stars 0 forks source link

Investigate perf issues #13

Open madeleineostoja opened 6 years ago

madeleineostoja commented 6 years ago

Very unscientiffic test, but ran Fetch as Google on simplajs.org, and the only thing that rendered was the one bit that isn't using simpla-paths (the footer)

screen shot 2017-12-16 at 4 26 36 pm

Might be worth profiling, and maybe even suggesting to deprecate this in favour of build-time path construction. Or, add a prerender buildstep to simpla-paths, so you can maintain easy clientside path recalculation

bedeoverend commented 6 years ago

Hmm...that is strange. I might try a version which is path-less, see if that is definitely what causes the issues. Regardless though, I'd be happy to deprecate, let people use frameworks / build time / backend to implement if they want it. In my experience, I've seen a lot of people doing their own namespacing, or none at all.

madeleineostoja commented 6 years ago

Yeah, I think the biggest advantage of simpla-paths though is how easy it is to dynamically change path trees on the client - eg: just wrap stuff in an en gid and boom global localisation. That would be nice to keep.

bedeoverend commented 6 years ago

Yeah - it's a nice feature. Perhaps we just should just add some disclaimers, less a core part to be used. To be fair I still haven't implemented that use case, even though I like it in theory.

Also having them as paths either statically or in a build step would make things like SSR a lot easier as you can do easy static analysis on the HTML

madeleineostoja commented 6 years ago

maybe this could somehow become an additive thing? Something you bolt on to existing paths just to dynamically modify them somewhere in the tree? Not sure what that would look like though