Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Can I build part of phalcon2?

I wanna write some tests and functionality (functionality from 1st branch of framework), 'n I MUST compile all phalcon2, it's too long... Can I do it faster?



84.5k
Accepted
answer
edited Nov '14

First time, compilation takes a long time, but in the second compilation it makes an incremental build only by compiling those files that recently changed, there are also situations that trigger a full compilation like removing an existing method or change the visibility attribute in a class that is a dependency of many classes.



1.1k

First time, compilation takes a long time, but in the second compilation it makes an incremental build only compiling those files that recently changed, there are also situations that trigger a full compilation like removing an existing method or change the visibility attribute in a class that is a dependency of many classes.

Agree with I saw files with md5 hashes. Is the Phalcon' team need some help with developing branch 2.0? If yes - where I can see completed issues and TODO?



84.5k

Most components are already migrated, only a few options in Phalcon\Config are missing and the implementation of Phalcon\Logger\Adapter\FirePhp



1.1k

Most components are already migrated, only a few options in Phalcon\Config are missing and the implementation of Phalcon\Logger\Adapter\FirePhp

as I see Translater\Gettext does not exist. also I've a problem with testing exception:

    file = fopen(options["content"], "rb");
    if file === false {
        throw new Exception("Error opening translation file '" . options["content"] . "'");
    }

how to add @ to fopen?



84.5k

Zephir does not have that @ silent operator, you can use fileexists first to check if the file does exist or isreadable to check permissions.

Most components are already migrated, only a few options in Phalcon\Config are missing and the implementation of Phalcon\Logger\Adapter\FirePhp

as I see Translater\Gettext does not exist. also I've a problem with testing exception:

   file = fopen(options["content"], "rb");
 if file === false {
     throw new Exception("Error opening translation file '" . options["content"] . "'");
 }

how to add @ to fopen?



1.1k

file_exist - toooooo slow

Zephir does not have that @ silent operator, you can use fileexists first to check if the file does exist or isreadable to check permissions.

Most components are already migrated, only a few options in Phalcon\Config are missing and the implementation of Phalcon\Logger\Adapter\FirePhp

as I see Translater\Gettext does not exist. also I've a problem with testing exception:

   file = fopen(options["content"], "rb");
 if file === false {
   throw new Exception("Error opening translation file '" . options["content"] . "'");
 }

how to add @ to fopen?



84.5k

why?

file_exist - toooooo slow



1.1k

for example: 1. fileexist or isreadable 2. fopen


2 operations (also I can create some benchmark to check it for time speed).

why?

file_exist - toooooo slow



84.5k

Actually, PHP implements a stat cache on where the information gathered in the first call is reused in the second call, also Zephir inlines the call to file_exists into a C function which has lower overhead.

https://github.com/phalcon/zephir/blob/master/Library/Optimizers/FunctionCall/FileExistsOptimizer.php#L55

Just wanted to say thanks to Andres. Not only for doing the majority of the development and leading this project, but fielding answers to questions and criticisms.

Thanks for all your hard work.

Actually, PHP implements a stat cache on where the information gathered in the first call is reused in the second call, also Zephir inlines the call to file_exists into a C function which has lower overhead.

https://github.com/phalcon/zephir/blob/master/Library/Optimizers/FunctionCall/FileExistsOptimizer.php#L55