0

I switched to Go from interpreted languages like javascript, php, python.

After using some CMS frameworks for web app like qor then i realized it loads all the resources at runtime like: backend and frontend even when user only access to the frontend.

All backend/admin resources will be loaded like: routing, SetupDashboard, templates ... after i ran go run main.go

All the memory will be allocated for those wasted resources?

Is it good for performance comparing to interpreted language while it loads needed resources with dynamic load (which Go don't have)?

def doSomething(name):
    name = "package." + name
    mod = __import__(name, fromlist=[''])
    mod.doSomething()

Or how compiled language like Go with its GC have it's way to handle the allocated memory while not in use?

TomSawyer
  • 3,711
  • 6
  • 44
  • 79
  • I honestly don't understand what you are asking, as there are many jumps in your wording. Almost like a collection of hints, which may serve to remind you of what you mean but which are next to useless for others. Take for example the second sentence: "it loads", what exactly does "it" refer to? – Ulrich Eckhardt Jan 18 '18 at 05:30
  • @UlrichEckhardt compiled language like Go will allocate all the declared memory in runtime. I wrote clearly, it loads whole backend even user only access to frontend : `http://domain/user` -> also load `http://domain/admin`, unlike interpreted language like php, python with dynamic import, it only includes template, json, allocate memory while user access to particular route like /admin or /user. – TomSawyer Jan 18 '18 at 07:59
  • Your answer contains two sentences, the first of which is clear. I tend to disagree with it though, but I'm not 100% sure what exactly you mean with "declare memory" and "runtime". The second "sentence" is a sequence of fragments strung together in a way that requires guessing how they relate to each other. Sorry, but I'm not going to guess. Consider writing short sentences, each expressing one thing and delimited by a period. – Ulrich Eckhardt Jan 18 '18 at 19:16

0 Answers0