Comments (48)
Thoughts @hoaproject/hoackers?
from core.
And what happens to Hoa\Core\Data
? If i understand, it is kept in Hoa\Core
, why ?
from core.
@Jir4 Because I am not sure about what to do with this one so far.
from core.
That make sense, it would be very interesting to do some benchmarks before/after core splitting to check the real difference on performances (not saying that it'll decrease performances but numbers/data are interesting).
from core.
@osaris ๐
from core.
@osaris Also, something else must be quantified but this is really hard: The psychological impact of having a โcoreโ for a library. This is something really important. Several people stops at this. The goal is to really continue to split. Please, see #97.
from core.
I started to split Hoa\Core\Exception
and Hoa\Core\Event
yesterday night.
from core.
Hoa\Event
is almost over.
Hoa\Exception
is under splitting (the repositories have been created).
from core.
I am starting to update libraries with Hoa\Event
and Hoa\Exception
.
from core.
First run. I will continue today if I have time.
from core.
@Hywan Sorry but most of your PR introduce a parse error: https://3v4l.org/vB5Dt
namespace Hoa\Exception {
class Exception {}
}
namespace Hoa\Database {
use Hoa\Exception;
class Exception {}
// Fatal error: Cannot declare class Hoa\Database\Exception because the name is already in useโฆ
}
from core.
Your should probably remove the use
statement.
namespace Hoa\Database;
class Exception extends \Hoa\Exception {}
from core.
Damned, I tested it on PHP7-nightly and it worked :-/.
from core.
@Metalaka Fixed.
from core.
Is it always possible to use flex entity ?
namespace Hoa\Database;
use Hoa\Exception as HoaException;
class Exception extends HoaException
{
}
from core.
@Metalaka I think so.
from core.
@Hywan flex entity seem to work at least for Hoa\Database
.
from core.
@Metalaka Hmm, yes, I shoud have update with the shortest name. Do you think this is required?
from core.
(anyway, I started to update the code).
from core.
The most important is do the same things everywhere (alias or alias+exception).
from core.
@Metalaka We use the shortest everywhere. I started to move every library to Hoa\Event
. I am updating this issue too.
from core.
All libraries have been updated to Hoa\Event
.
from core.
All libraries have been updated to Hoa\Exception
(final).
from core.
Hoa\Consistency
has been created. I will move the code tomorrow. Hope to start test suites tomorrow too.
from core.
Hoa\Consistency
is OK. Now I will start updating other libraries.
from core.
All tests are green for Hoa\Protocol
split. Now I have to write the test suite of Hoa\Protocol
but the integration of the new library is fine!
from core.
Everything is OK!
I am starting #97.
from core.
@hoaproject/hoackers Please, I need your help!
- What about
Hoa\Zformat
instead ofHoa\Parameter
? Do you think this is better? - What to do with
Hoa\Core
? See the โNext stepsโ Section in #96 (comment) for the questions.
Thanks!
from core.
- Why
ZFormat
? Meaning ? - I think we should delete
Hoa\Core
, theCore
name scares many users imo, they just wanna use a specific lib but theCore
dependancy seems imply that the lib need many others to work
from core.
- zFormat because this is the format we use to express parameters.
- Yes, we will โremoveโ it, but for legacy code, it must still be present as a repository. We can mark it as deprecated and keep the code as is. Thoughts?
from core.
- Ok so ๐
- So we keep it just to avoid a BC break and we will remove it when another BC break occurred ?
from core.
@Jir4 We will remove it when we will no longer have any downloads. Until we have downloads, we must keep the repository live :-].
from core.
@Hywan the downside of this approach is that we will have downloads (at least for CI systems) so long as it will be availableโฆ
IMHO we should announce an estimated end-of-life
from core.
@CircleCode Hmmโฆ Every year, we can clean deprecated repositories? So far, we only have Hoa\String
(see git.hoa-project.net). How long is enought?
from core.
Several month but not years, we just have to let the time to users to update their legacy code.
from core.
Success (95 tests, 800/800 methods, 0 void method, 0 skipped method, 180913 assertions)!
Hoa\Zformat
has been created. I am removing hoa/core
from everywhere :-).
from core.
All libraries are updated. Now I am running devtools:cs
to update the year.
from core.
Done.
from core.
Next step is to merge everything and create new snapshots for all libraries. I don't have enough time to do it well if something failed right now. Let see tonight or tomorrow!
from core.
Done \o/.
Congratulations to everyone ๐ ๐ ๐!!
from core.
๐
from core.
๐
from core.
๐
Great job!
I've just read the discussion, do you know what you earn by registering hoa://
in Composer? For projects like the official website, Rulerz, some Liip projectsโฆ
from core.
@1e1 What we earn? I don't understand.
from core.
I suppose that he speak about performance
from core.
That's very light. Let me try a small benchmark.
from core.
Yeap! (Sorry)
from core.
tl;dr
Here is small benchmark result when loading Hoa (because we have 1 require autoloaded file):
vs | Time (for 1000 runs) | Memory |
---|---|---|
Hoa\Core |
18.084s | 335408b |
Hoa\Consistency |
15.959s | 56744b |
Gain | 11.751% | ย 83.082% |
Time
First script /tmp/a.sh
:
for i in `seq 1 1000`; do
php -r 'require "/usr/local/lib/Hoa/Core/Core.php";'
done
Second script /tmp/b.sh
:
for i in `seq 1 1000`; do
php -r 'require "/usr/local/lib/Hoa/Consistency/Prelude.php";'
done
Time for time
:
$ time /tmp/a.sh
/tmp/a.sh 11.37s user 5.64s system 94% cpu 18.084 total
$ time /tmp/b.sh
/tmp/b.sh 9.56s user 5.07s system 91% cpu 15.959 total
That's an improvement of 11.751% at loading time.
Memory
First script /tmp/a.php
:
<?php
$a = memory_get_usage();
require '/usr/local/lib/Hoa/Core/Core.php';
var_dump(memory_get_usage() - $a);
Second script /tmp/b.php
:
<?php
$a = memory_get_usage();
require '/usr/local/lib/Hoa/Consistency/Prelude.php';
var_dump(memory_get_usage() - $a);
Time to run:
$ php /tmp/a.php
int(335408)
$ php /tmp/b.php
int(56744)
That's an improvement of 278664b, be 272Kb, be 83.082% at initialization per process per run.
from core.
Related Issues (20)
- I'm getting this error *"Hoa main file (Core.php) must be included once."* HOT 7
- mark as deprecated HOT 1
- Support \U, \u, \L, \l, \E and \e in the zFormat HOT 1
- Do we need to cache `extension_loaded` result? HOT 3
- Use a trait for Hoa\Core\Event
- Hoa\Core should NEVER edit php configuration. HOT 12
- Hint IDEs about property. HOT 3
- hoa break when installed globaly HOT 3
- The 'hoa' binary should not be installed with Core HOT 19
- Add a `home` command to open http://hoa-project.net HOT 1
- Setlocal issues in core HOT 4
- PHP7 compatibility
- `Exception::uncaught` can receive a `BaseException` in PHP7.0
- Update `Consistency::isKeyword` for PHP7.0 HOT 1
- Protocol: `stream_stat` is not very verbose when failing
- Does Hoa Core need the "files" load approach in Composer? HOT 14
- Hoa/Core errors when loaded twice HOT 39
- Hoa shouldn't initialize before being used HOT 7
- [meta] Split the core, next HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.