神戸Pythonの会での SQLAlchemy 入門ハンズオンの資料です。 座学パートの多いSQLAlchemy Primerよりもハンズオンに重点を置いて、日本語で書き直しました。

PHPerで使っていない人はいないというぐらい、メジャーなPHPの依存管理ツールComposer。 ですが、動作が遅いという欠点があります。 Composerが遅い原因は主に下記だそうです。 packagist.orgが日本から遠い composerのアーキテクチャ的に、小さなjsonファイルを少しずつダウンロードするため、ネットワークの遅延がもろに影響する composerがfile_get_contentsでjsonをダウンロードしていて、どうやらKeep-Aliveを使っていないし、並列ダウンロードもしていない Qiita またある日@cakephperさんがこんなことを呟いていました。 アメリカでcomposer installしたら高速すぎてビックリした— cakephper (@cakephper) 2015, 11月 17 そしたら、packagistのミラーサイト作ればいい
Nov 24, 20155 likes40,391 viewsAI-enhanced description This document discusses strategies for optimizing access to large "master data" files in PHP applications. It describes converting master data files from PHP arrays to tab-separated value (TSV) files to reduce loading time. Benchmark tests show the TSV format reduces file size by over 50% and loading time from 70 milliseconds to 7 milliseconds
This document discusses PHP file includes and requires and how the PHP opcode cache handles them. It covers how PHP resolves include paths, checks if a file has already been included, and validates file timestamps when revalidating paths. It also discusses using the opcode cache status to view cache metrics and how to invalidate files from the cache.
こんにちはこんにちは、 VOYAGE GROUPでBuild prayer*1として活動している@_nishigoriです。 pip, bundler, rebar 等 各プログラミング言語のビルドツールないしパッケージマネージャ等と呼ばれているツールを弊社でも利用していますが、 PHPでは依存管理ツールとしてComposerを利用しているプロジェクトがあります。 今回はComposer本体のバージョニングについて紹介し、 利用する上での良い側面と悪い(と思われる)側面を紹介します。 はじめに Composerの入手 最新版 *2 Installer self-update リリースサイクル 効能 デメリット self-updateする日時によってrevisionが異なる(場合がある) ある日のself-updateで突然死 Tagging Versions Installer self-
同僚が potatotips という Android/iOS の Tips を共有する勉強会、というのやってて楽しそうだったのがあり、そういやPHP懇親会、という最初から飲んで全員が発表するスタイルの勉強会大昔にやったな、というのを思い出してもう一度なにかやってみよう、と思いました。 phpblt.connpass.com ちょっとテッキーなかんじの雰囲気にできると面白いかなーと思います。 ネタには制限はとくにないけど、宣伝っぽいやつじゃないほうがいいな。 もはや PHP にネタは限定しないので、Web周辺、インターネット全般でも良いかと思います。 BLT ポテトチップスに対抗するならなにがいい、と同僚のQAの子に聞いたら「ベーコン!」といってたので、BLT を思いついて、ちょうど LT って入ってるから良さそうだと思って決めちゃいました トップのカチョイイ絵は同僚のスーパーデザイナーが作
「PHP 7」登場。10年ぶりのメジャーバージョンアップで実行速度はPHP 5の2倍以上に、PHPの生みの親が語る。PHPカンファレンス2015(前編) WordpressやFacebookなど、Webのさまざまなサービスで使われているPHP言語。約10年ぶりのメジャーバージョンアップとなる「PHP 7」がもうすぐ登場予定です。 PHP 7では互換性を維持しつつ、従来のPHP 5と比べて2倍以上の性能向上やメモリ使用量を低減するなど、大きな改善が実現されます。 そのPHPの生みの親であるRasmus Lerdorf氏が来日し、10月3日に都内で行われた「PHPカンファレンス2015」の基調講演「SPEEDING UP THE WEB WITH PHP 7」においてPHP7の新機能や性能について詳しく解説しました。 その内容をダイジェストで紹介しましょう。 SPEEDING UP THE W
Dodge the thundering herd with file-based Opcache in PHP7 In the last blog post about Fine-Tuning Opcache Configuration I mentioned the thundering herd problem that affects Opcache during cache restarts. When Opcache is restarted, either automatically or manually, all current users will attempt to regenerate the cache entries. Under load this can lead to a burst in CPU usage and significantly slow
Fine-Tune Your Opcache Configuration to Avoid Caching Surprises The Opcache extension has been part of the core for ten years and adds support for byte-code caching of PHP scripts. For a dynamic language such as PHP, a byte-code cache can increase the performance significantly, because it guarantees a script is compiled only once. The default settings of the Opcache extension already boost PHP per
Reminder on OPCodes caches# PHP is a scripting language, that by default will compile any file you ask it to run, obtain OPCodes from compilation, run them, and trash them away immediately. PHP has been designed like that : it "forgets" everything it's done in request R-1, when it comes to run request R. On production servers, the PHP code is very unlikely to change between several requests, thus,
By no means, NewRelic is taking the world by storm with many successful deployments. But what are the cons of using it in production? PHP monitoring agent works as a .so extension. If I understand correctly, it connects to another system aggregation service, which filters data out and pushes them into the NewRelic cloud. This simply means that it works transparently under the hood. However, is thi
4年前にHashDos(Hash Collision Attack)に関する効率的な攻撃方法が28C3にて公開され、PHPを含む主要言語がこの攻撃の影響を受けるため対策を実施しました。しかし、PHP以外の言語が、ハッシュが衝突するデータを予測困難にする対策をとったのに対して、PHPは、GET/POST/COOKIE等の入力データの個数を制限するという対症療法を実施したため、PHPにはHashDosに対する攻撃経路がまだ残っているということは、一部の技術者には知られていました。例えば、以下の様なつぶやきにも見ることができます。 だって、 hashdos 脆弱性の時、 Python とかの言語が、外部入力をハッシュに入れるときに衝突を狙えないように対策したのに、phpだけPOST処理で対策したからね? json を受け取るような口もってるphpアプリのほとんどがhashdos残ってるんじゃない
Is Scaling PHP a pain in the ass? You're not exactly the next Facebook, but you're big enough, and it costs real money when your site goes down in the middle of the night. Everything I've ever learned about scaling PHP— I slept infront of my laptop for a year while scaling Twitpic, rolling over to restart Apache at 2am before drifting back to sleep, but when you're a startup- you do what you have
The most common question people asked about my last post: I really want to use Zend Optimizer but I have NO IDEA what settings to use. (As a quick reminder, here's the full article) Have you ever noticed how you can spend hours reading docs, but without an example or real world case study, you have NO IDEA what the settings actually do? Like, you understand what "opcache.memory_consumption" MEANS,
A common layer What do we want? Re-use at the web layer! Superglobals and side-effecting output mechanisms of PHP make this challenging and force every framework to re-invent. But Symfony's HttpKernelInterface provides a solid interface, which makes creating and sharing framework-agnostic HTTP filters a breeze!
by @dekokun on 2014/06/22 23:34 Tagged as: PHP, composer. 概要 composer installには–optimize-autoloaderオプションつけたほうが若干アプリケーションの性能が上がるよ。 もしくは、composer installした後にcomposer dumpautoload -oするか。 なぜか composerが自動生成するautoloaderは、以下の順番でクラスファイルを探していくんですね。 vendor/composer/autoload_classmap.php(以下、classmapファイルと記載)ファイルの中にクラス及びそのファイルの定義があればそのファイルをinclude 上記なければそのファイルをまぁいろいろ検索してファイルの存在まで確認して存在すればinclude というわけでclassmap
Lately, we spent quite some time optimizing Mouf's performance. It appeared that one of the bottlenecks was Composer's autoload mechanism. Our application was spending quite some time in the autoloader instead of doing interesting things. I was curious to see how much was spent in Composer's autoloader, so I did a little benchmark with a simple "Hello World!" application in Mouf. A bit of theory f
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く