Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103337 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51667 invoked from network); 19 Oct 2018 18:06:14 -0000 Received: from unknown (HELO mail-qt1-f181.google.com) (209.85.160.181) by pb1.pair.com with SMTP; 19 Oct 2018 18:06:14 -0000 Received: by mail-qt1-f181.google.com with SMTP id q40-v6so38473377qte.0 for ; Fri, 19 Oct 2018 07:20:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=l/2IrfEUI9hlywfqBpQ5ib9ssuzPJniUi9k4OQ8RKh4=; b=EnOt5O03jtg7wSi9y5/9tUB80bY4WAch0RfCL4LUl4ZXHpjs2qx/mLD8P26GCSBseb Yt1tysZqZgdF6vJT3GVcX8WqcckWEIsJgtk0pkQ+BsFqUYis9eSpUZGByV129SDd7Ctb o0L+Bx17aRpECcB5cdzAb3vXLoE8C8nyLfaTxQMBuT4aGfYNj0bZS7vSlqt0Q4enq+jb qAZBdn7ikTT6aWUHpWgCtrAd1JcPtEqc2AK2Ia9cqNjhklbAPedDuO59wQxbrP8wFXeu ogHaAQHOjWLJ1UM2U4M4Zhj8TYDZ/GqukxQ/tJxgP6AwzfAFYkkeJrXpexCgWYlmtqk6 B9kA== X-Gm-Message-State: ABuFfojL0V2zFl/rgeHwVeZjInOOmYJgq56X2MzOxI82jUVlFs5dyq0z 7evOf0UcdfPG1vLp+vzobRxT73U63BdNZbQooMmPeJs6tnEImg== X-Google-Smtp-Source: ACcGV615DZYayN1GIZrUf4oQqN+0/9vSykZ6encp1aHX7h0Ue2NgPIXYhf6t3uWan4J6NdtPUHnkKhOGJRk5zH1uO6s= X-Received: by 2002:aed:2c86:: with SMTP id g6-v6mr34127342qtd.15.1539958808175; Fri, 19 Oct 2018 07:20:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 19 Oct 2018 09:19:57 -0500 Message-ID: To: Dmitry Stogov Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Preloading From: pollita@php.net (Sara Golemon) On Fri, Oct 19, 2018 at 3:17 AM Dmitry Stogov wrote: > I would like to start discussion on a Preloadng RFC https://wiki.php.net/= rfc/preload > Overall, big +1. A few questions: 1) "Only classes without unresolved parent, interfaces, traits and constant values may be preloaded." Is this determined at the moment of an individual opcache_compile_file()? Or can mis-ordered includes resolve themselves upon later compiles? e.g. I compile a.php with `class A extends B {}`, then subsequently compile b.php with `class B {}`. The engine has enough information to resolve this, even if it wasn't presented in an ideal order. 2) Will we raise warnings explaining why a given class is being deferred from pre-loading to help users understand how to use this correctly? 3) "Preloading may be used as systemlib in HHVM to define =E2=80=9Cstandard= =E2=80=9D functions/classes in PHP" Presumably the internal APIs will be defined to handle this at the script level already. What stops us from simply ZENDAPIing the proto and letting extensions call it if they want? ((Simple conservatism is an adequate answer, but I'd like to know why it's out of scope)). 4) "In conjunction with ext/FFI (dangerous extension), we may allow FFI functionality only in preloaded PHP files, but not in regular ones." Is there any interest in something like HHVM's HNI interface? FFI always sounds nice in theory, but complex types mean that a little bit of glue code is often a plus. > I'll try to fix this in nearest week(s). > Thank you for everything you do. -Sara