Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDGJu-0007MV-K1 for pgadmin-hackers@arkaria.postgresql.org; Tue, 23 May 2017 20:22:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dDGJu-0003q4-6t for pgadmin-hackers@arkaria.postgresql.org; Tue, 23 May 2017 20:22:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dDGJe-00030T-UV for pgadmin-hackers@postgresql.org; Tue, 23 May 2017 20:22:03 +0000 Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dDGJa-0006QR-1p for pgadmin-hackers@postgresql.org; Tue, 23 May 2017 20:22:02 +0000 Received: by mail-it0-x22f.google.com with SMTP id a10so9577527itg.1 for ; Tue, 23 May 2017 13:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AT+jHezFBM+EicTM7e+KLG/oaYJ0olQdKEbqq71PYXY=; b=K9Rk3YTaWwowybkxqITQlzKFfbhChvUTlM1mLKzb086cN/+nHQ3pQah8YvuJTtdDti fDT8vRmW3Of6U6imMp71+J00JgynIJfRYE+9EfgCfNWAc0j8ceDfKxOIBtFrGyIVytl5 be1Sc84pO/PWh9yOnsJVnZMPtfkAAoi2iiC9YTS0s48YwKpCKaDOhR3QPSuapzmvwGDT 9Q1jCz0dL+BJpg+WTPRaZKtHS/OhFHUMt128KXWEtUx0CSlZjNWxAGEtWPwZmZ8vB13g 97p01gwxJzc9MBRSy3CaMYW1QsytyAAJ4GZUz8bH9MxZtOu8Y4h6AUOBFH8op9nphe/2 d6Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AT+jHezFBM+EicTM7e+KLG/oaYJ0olQdKEbqq71PYXY=; b=Pn7ejtRls6ZmKI5PH/gPQdT8mPixe0/o5/xmuFZDab90UxoXe/aANeYKwlHWTR/+Tj eopXd+jNbRNMuO1CMxPeOK+6iWdURjhZJFVI7I0wbn6DmaBcLwbHTOPNY/YFsS0xOh4y syuC+Qdmne7XeV2Q3ulmeQsUfnyjKt6k42EwYEgp+1uaHskHwD6fTrmjTXl91fzQzYKj 3Gkjx+2IAY2uMqttoD7TLeqMtiV080Fw/gvo2rq1ZsqM1lEpVWc9FToFzhr8D4WhRXKM dDgqf62YAN6QFLWlDyFRlZ6DjdkZSSq5Bwa4WAKfHXFXd27Xbe7u3feVH2Ivm4CsJX/o KU5w== X-Gm-Message-State: AODbwcA/GAqfeoWJBvWFTlIqiok5+H3N6arT9AhVgvxx+Q0fNrrW0mvp mhlSERyTVRzWotEOsOxa5lAaF43AiehL X-Received: by 10.36.74.3 with SMTP id k3mr5136937itb.28.1495570915791; Tue, 23 May 2017 13:21:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.147 with HTTP; Tue, 23 May 2017 13:21:55 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Tue, 23 May 2017 16:21:55 -0400 Message-ID: Subject: Re: [pgAdmin4][Patch]: Load module's JS files only when required To: Joao Pedro De Almeida Pereira Cc: Surinder Kumar , pgadmin-hackers Content-Type: text/plain; charset="UTF-8" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi On Tue, May 23, 2017 at 2:45 PM, Joao Pedro De Almeida Pereira wrote: > Hello > > >>> I wrote few grunt tasks using r.js optimizer this weekend > > How did it compare to webpack? > >> I am already starting to wonder if Grunt is the best way to do this >> though. It might be easier (though not quite as efficient) to have the >> Python module all return their static/template JS code at initialisation, >> effectively dynamically building a single packed file containing nearly >> everything. > > We could. Are you saying that the app should bundle js every run? To be > fair, this is what we're currently doing with Grunt, but it feels like we > should change this for non-development use. For every non-debug run, it should check for changes in files, perhaps by comparing the mtime of the packed file against all of the files it would contain. However, that begs the question of what happens in an installed instance, where the user running it likely doesn't have permissions to re-pack the files if they're in the installation directory. Perhaps packing should be done into a temp directory for each user? For debug runs, it should use the unpacked files in each module. >> Yeah, though I think there are more considerations we haven't yet thought >> of. > > Something we aren't clear on is the end-user use case of dropping modules > into existing installations. Is this achieved via installer? That's the intention, yes. It could be that the installer would re-pack everything by calling a script we can supply, or the mechanism I suggested above could handle it on next launch. I'm actually thinking that maybe it would be easier to start with the CSS files.... -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers