Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.114 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.00; 'anyway.': 0.05; 'python': 0.11; 'function?': 0.16; 'subject:skip:e 10': 0.16; 'xslt,': 0.16; 'module': 0.19; 'solution.': 0.20; 'code,': 0.22; 'import': 0.22; 'tests': 0.22; 'propose': 0.24; "i've": 0.25; 'compiled': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'anyone': 0.31; 'file': 0.32; 'actual': 0.34; 'could': 0.34; 'received:google.com': 0.35; 'disk': 0.36; 'executing': 0.36; 'done': 0.36; 'possible': 0.36; 'feedback': 0.38; 'thank': 0.38; 'to:addr:python-list': 0.38; 'fact': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'entire': 0.61; 'worth': 0.66; 'potentially': 0.81; '*and*': 0.84; 'clearer': 0.84; 'quicker': 0.84; 'xslt': 0.84; 'directly.': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jj0RmrQF8DTFVrpRdua6P03+lrcTWaB+K5ukdyJksxk=; b=lwGcjwh5fs2+Xs/XqBaSpaJjxcb3AF6B4Ctg8YDDfABwxrLm9VnTGJG4UMI8E+R6Zf z6ohNROID5SINEj8j0F3bPoDSofa7WU+SUkVzXicNVBLOnzof3WFJLDXzfnNM3eqE271 3trMS86JbveLty5r5jeZjA/s7FnY8uBZWVpbuV7n9fPOIPsA7XPKDqOwjHXZvr4Gv6Io d7aEX5zLhTfWnP2F57f53nPlJIh/Y2zzwM5KttqzpBKIfoEwqVPxSBqKXGmW77JxkpuA dgdotjK1YTarVCgM95XaE264a3cPgSHQ9aWMgKZ1c7Oe5NicYyizRmbx6bUmB6X8NUyH nbIQ== MIME-Version: 1.0 X-Received: by 10.180.205.163 with SMTP id lh3mr51042043wic.63.1421242725029; Wed, 14 Jan 2015 05:38:45 -0800 (PST) In-Reply-To: References: <54b592ac$0$12995$c3e8da3$5496439d@news.astraweb.com> Date: Wed, 14 Jan 2015 14:38:44 +0100 Subject: Re: Performance in exec environnements From: Jean-Baptiste Braun To: python-list@python.org Content-Type: multipart/alternative; boundary=001a11c381bec3de9e050c9cdb1d X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421242733 news.xs4all.nl 2834 [2001:888:2000:d::a6]:51036 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:83752 --001a11c381bec3de9e050c9cdb1d Content-Type: text/plain; charset=UTF-8 2015-01-14 12:14 GMT+01:00 Chris Angelico : > Would it be possible to do a one-off transformation of the entire XSLT > file into a Python module with a single function in it, and then every > time you need that XSLT, you import that module and call the function? > That would potentially be a lot quicker than exec(), *and* would be > much clearer - there'd be an actual file on the disk with your > generated Python code, and anyone could read it and understand what > it's doing. > I've done some tests executing compiled generated python and it doesn't seem to be worth over processing xslt directly. What you propose could be a solution. In fact I'm not sure yet how it will be designed. Thank you for feedback anyway. --001a11c381bec3de9e050c9cdb1d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2015= -01-14 12:14 GMT+01:00 Chris Angelico <rosuav@gmail.com>:
=
Would it be possible to do a one-off transformation of the entire XS= LT
file into a Python module with a single function in it, and then every
time you need that XSLT, you import that module and call the function?
That would potentially be a lot quicker than exec(), *and* would be
much clearer - there'd be an actual file on the disk with your
generated Python code, and anyone could read it and understand what
it's doing.
I've done some tests executing compile= d generated python and it doesn't seem to be worth over processing xslt= directly. What you propose could be a solution. In fact I'm not sure y= et how it will be designed.

<= div class=3D"gmail_extra">Thank you for feedback anyway.
--001a11c381bec3de9e050c9cdb1d--