-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
Ignore this PR for now... I've got a little more work to do, then I want to add some notes to the PR itself. |
No problem! This is fantastic! Bert Madeira is considering some repackaging of JavaFBP - is this something Regards, Paul On Tue, Jun 7, 2016 at 12:37 AM, Dan Rumney notifications@github.com
|
Appreciate the offer, but Java is not a strength of mine and there are a few more things I'd like to make sure are supported by JSFBP |
@@ -4,3 +4,4 @@ node_modules/ | |||
npm-debug.log | |||
test/components/goodbye-world.txt | |||
examples/data/text_new.txt | |||
examples/isolate-*-v8.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the logs that the node profiler generates, so we can ignore them
OK - this is ready for your reviewing |
I tried to make it so that code that modifies ports is port code, code the modifies processes is process port, etc. I also added some more tests, based on examples that failed for me until I fixed them.
… full ones are readily identifiable
ba6d2a6
to
d12c2b9
Compare
try { | ||
runtime.run(_.values(this._processes), options, callback ); | ||
} catch (e) { | ||
console.log('Connections'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am finding this very useful. When there's a deadlock, show all the connections and which ones are full. This may help identify why there's a deadlock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good - is this integrated with my deadlock display - or does it
replace it?!
On Wed, Jun 8, 2016 at 11:04 AM, Dan Rumney notifications@github.com
wrote:
In core/Network.js
#74 (comment):@@ -86,12 +87,20 @@ Network.prototype.getProcessByName = function (processName) {
Network.prototype.run = function (runtime, options, callback) {
options = options || {};
- _.forEach(this._processes, function (process) {
- _.invokeMap(process.inports, 'setRuntime', runtime);
- _.invokeMap(process.outports, 'setRuntime', runtime);
- });
- runtime.run(_.values(this._processes), options, callback || function () {});
- callback = callback || function () {};
- _.invokeMap(this._connections, 'setRuntime', runtime);
- try {
- runtime.run(_.values(this._processes), options, callback );
- } catch (e) {
- console.log('Connections');
I am finding this very useful. When there's a deadlock, show all the
connections and which ones are full. This may help identify why there's
a deadlock.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jpaulm/jsfbp/pull/74/files/d12c2b94b326314da1d5fe633ff423f329d25d0b#r66273523,
or mute the thread
https://github.com/notifications/unsubscribe/AATGJzMTFg7DyGNxVKEd04O0zZJkEXXbks5qJtoOgaJpZM4IviIh
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then runtime still displays the deadlock details. Network then catches the exception that gets thrown and shows the connection details.
Came across message "No process passed to input port" , apparently generated by InputPort.js . Since InputPort is not specified by the developer, it seems unlikely that it will be called with a missing or null parameter...? Just curious... |
What were you running when you saw that message? |
Here is the output from InputPort.js: InputPort |
Strange. You're on the master branch, I assume? And you're up to date (git On Wed, Jun 8, 2016, 20:54 Paul Morrison notifications@github.com wrote:
|
Disregard that last comment... I see them. I'll take a look at the tests On Wed, Jun 8, 2016, 23:20 Dan Rumney dancrumb@gmail.com wrote:
|
So, this is a whole host of moving code around.
As I was steadily understanding how things worked, I started renaming variable and functions, or extracting stuff, so that the code more readily explained itself.
I noticed a lot of code where Object A was making modifications to Object C or D's properties, even though they were owned by Object B.
I've tried to rejig things so that there is a little more encapsulation.
I also beefed up the tracing.
Finally, after all this, I did some profiling and made the odd tweak here and there.
All in all, it's mostly just relocation of code. I understand that it's a chunk of work, but I hope it adds clarity to you as well as me.