Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor refactoring and poll attention values only when graph is active #6

Open
wants to merge 1 commit into
base: psigraphs
Choose a base branch
from

Conversation

elggem
Copy link

@elggem elggem commented Dec 8, 2016

  • updated bower dependencies
  • fixed missing dependency in index.html
  • implemented hacky way to only pull the openpsi values when the graph is loaded

@eddiemonroe
Copy link
Owner

eddiemonroe commented Dec 13, 2016

@elggem hi ralph, thanks for your work on this! i've tried using this with openpsi, and the glimpse app slows down to a crawl. i think the issue is that the visualizer is trying to load the whole atomspace, which apparently gets large when nlp and chat are running with openpsi.

i think it would be good to keep the visualizer and the psi variable graphing decoupled in terms of the server connection, as they are in the version before these changes. my understanding is that with these changes, the visualizer connection to the server through the initial connection dialog box (and the resulting loading of the whole atomspace (as the visualizer is currently programmed at least) is needed for the openpsi graphing to work. is that right?

obviously using the same server connection info as the glimpse visualizer (rather than hardcoding) is great, but until issues like loading the whole atomspace in the visualizer are worked out, i think we want to have the openpsi grapher be able to connect to the REST API without needing the visualizer to connect (or at least without loading all the atoms).

that make sense? thanks!

@elggem
Copy link
Author

elggem commented Dec 13, 2016

Hi Eddie,

agreed, it would be good to decouple the OpenPSI variable fetching from the AtomSpace being loaded! What I was trying to achieve was decoupling server communication logic from the view controller. In the current implementation of my demo visualizer I've completely seperated OpenPSI values and Atomspace fetching into two seperate factories that only poll the server when necessary. I will roll these changes back into Glimpse after refactoring them, probably sometime early next year.

For now I can offer you this trick: Try adding $rootScope.slideMode = true into main.js at line 13. This should trigger the "slideMode" that will only fetch the atoms in the attentional focus, which should be much less, if not zero.

Let me know if that helps!

@eddiemonroe
Copy link
Owner

eddiemonroe commented Dec 13, 2016 via email

@elggem
Copy link
Author

elggem commented Dec 13, 2016

My suggestion for using slidemode for debugging now comes from the fact that the only thing changing when in slidemode is that the visualizer only fetches stuff in the AF, there is no other mention of it anywhere else in the code. But, I realized you don't actually need to change anything in the code, just pressing the "slidemode" button once in the sidebar before connecting changes it, although there's no feedback from the UI.

Hmm. With the previous version how did you avoid loading the Atomspace when graphing OpenPSI? Did you just not connect using the connection dialog and skip straight to the graph panel? For the demos we are running the visualizers on different machines than OpenCog, I would really like to avoid hardcoding the URL and having $http requests in the view controller...

If you absolutely need an intermediate version that only polls the server for OpenPSI values after the graph has been loaded but uses a hardcoded URL and not the built-in connection factory let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants