faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
feepbot has quit [*.net *.split]
feepbot has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
_whitelogger has joined #amber
<FromGitter> <rukkiddo> since my amber project compiles in 25 seconds, I thought I could do much faster than you guys, spent a week, migrated project to raw crystal server no it compiles in 5-8 seconds
<FromGitter> <rukkiddo> but when I open a page it is like 15x slower lol
<FromGitter> <Blacksmoke16> how you handle routing?
<FromGitter> <rukkiddo> I created a class called Req
<FromGitter> <rukkiddo> I have my methods like ⏎ Req.get "/" do
<FromGitter> <Blacksmoke16> i mean when a request comes in, how does it know what action to call
<FromGitter> <rukkiddo> class Req ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ end [https://gitter.im/amberframework/amber?at=5ff1f0fa93af5216fc7c9fae]
<FromGitter> <rukkiddo> oh it didnt look good here
<FromGitter> <rukkiddo> now it looks better
<FromGitter> <rukkiddo> anyways I was using same folder structure of amber
<FromGitter> <Blacksmoke16> so i guess it does something like `Req.routes[request.path]`?
<FromGitter> <rukkiddo> yeah
<FromGitter> <rukkiddo> server = HTTP::Server.new do |context| ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5ff1f17663fe03449635d502]
<FromGitter> <rukkiddo> what kind of magic amber is using
<FromGitter> <rukkiddo> why it is so much faster
<FromGitter> <Blacksmoke16> i guess none of your routes have params
<FromGitter> <rukkiddo> they have from Req.ctx
<FromGitter> <Blacksmoke16> prob is making use of all your cpu cores
<FromGitter> <rukkiddo> but why it is using all cpu cores
<FromGitter> <rukkiddo> I thought I wrote something so much smaller than amber
<FromGitter> <Blacksmoke16> no, im thinking thats why amber is faster
<FromGitter> <rukkiddo> hmm
<FromGitter> <rukkiddo> if only there was a tool to convert between ruby and crystal. I could develop in ruby with a faster workflow, then I could compile in crystal to have better performance
<FromGitter> <rukkiddo> I am almost sure it was't this slow when I first start with it
<FromGitter> <rukkiddo> I mean by time either crystal or amber got slower for compiling
<FromGitter> <Blacksmoke16> crystal did
<FromGitter> <Blacksmoke16> llvm to be specific
<FromGitter> <rukkiddo> and what we gained for sacrificing compilation speed
<FromGitter> <rukkiddo> for instance is it now faster when you run etc.
<FromGitter> <Blacksmoke16> :shrug: not super familiar with that
<FromGitter> <Blacksmoke16> i dont think rolling your own framework is the best idea tho
<FromGitter> <rukkiddo> it definetly isn't the best idea, i am happy with the experience though
<FromGitter> <Blacksmoke16> fair enough