These are chat archives for codexa/firetext

18th
Sep 2015
Daniel Huigens
@twiss
Sep 18 2015 09:31
Hey, I'm back! Could you help me test some things on a low memory phone when you have time, for the collab thing?
Joshua Smith
@joshua-s
Sep 18 2015 12:58
Sure!
Daniel Huigens
@twiss
Sep 18 2015 13:06
Alright. First, could you install twiss/firetext/collab-app
Second, could you install airbornos/airborn-collab-app
Then, one time, open a document in Firetext and click Collaborate in the menu
(The point of this is to test memory pressure so less memory is better I think)
Daniel Huigens
@twiss
Sep 18 2015 13:11
Fourth, open the Shared Files app you installed and click the name of the document you shared
It opens Firetext with the document, and prints a line of text in the Shared Files app every time the document is edited.
Please try to get the Shared Files app, but not Firetext, to quit by opening another app, opening Firetext, etc, or in another way
Daniel Huigens
@twiss
Sep 18 2015 13:17
It should be fairly easy to get it to quit. I'll change things until it's no longer possible (hopefully)
Joshua Smith
@joshua-s
Sep 18 2015 13:21
How low memory?
256 mb?
Daniel Huigens
@twiss
Sep 18 2015 13:24
Yes, I'd try that
Joshua Smith
@joshua-s
Sep 18 2015 13:55
I'm getting : NS_ERROR_FILE_NOT_FOUND:
Daniel Huigens
@twiss
Sep 18 2015 14:05
When do you get that error?
And can you see which file that is?
Joshua Smith
@joshua-s
Sep 18 2015 14:26
I get it when I try to open a file
Right after the script logs "Loading modules/editor/editor.html"
Full error: NS_ERROR_FILE_NOT_FOUND: modules.js:74:0
Daniel Huigens
@twiss
Sep 18 2015 14:28
git submodule update --init --recursive
Joshua Smith
@joshua-s
Sep 18 2015 14:30
oh right
/me facepalms
Daniel Huigens
@twiss
Sep 18 2015 14:31
It took me a while too
Joshua Smith
@joshua-s
Sep 18 2015 14:52
It doesn't work on 256 mb because the apps are killed by the low memory killer
Daniel Huigens
@twiss
Sep 18 2015 14:53
When are they killed? Is Shared Files killed when you open the file?
Joshua Smith
@joshua-s
Sep 18 2015 15:03
Let me up the memory
They are killed when I hit collaborate
I am running FFOS master which has performance regressions
I got "success" on 512 mb
Joshua Smith
@joshua-s
Sep 18 2015 15:10
Ok, so Firetext opens as a popup
I can't exit it
Do you know off the top of your head the way to do this?
activity.end?
Daniel Huigens
@twiss
Sep 18 2015 15:11
window.close, or activityRequest.postResult
Joshua Smith
@joshua-s
Sep 18 2015 15:11
:+1:
It worked: changed /path/file.txt
Just one note: the two app approach might be a bit confusing?
Daniel Huigens
@twiss
Sep 18 2015 15:13
Alright. Can you get it to not work, by getting Shared Files killed?
Joshua Smith
@joshua-s
Sep 18 2015 15:14
When Firetext opens as a popup, it is a child of the Shared Files app
So killing the Shared Files app would kill both
Actually, ignore that ^
Daniel Huigens
@twiss
Sep 18 2015 15:15
Yeah, maybe. We might need to make it a library or something instead, or wait for https://bugzil.la/1035053
Joshua Smith
@joshua-s
Sep 18 2015 15:16
I opened the file in another Firetext instance and edited it. The shared files app recognized that
How do you want me to kill it?
Just do a lot of memory-intensive stuff in Firetext? Or another app?
Daniel Huigens
@twiss
Sep 18 2015 15:17
Yes, something like that
Opening another app is probably easier, and then switch to Firetext to keep that open, and then open another app, something like that I'd think
It's actually not supposed to be possible to edit the file from another Firetext instance, so that needs to be fixed at some point

So killing the Shared Files app would kill both

That would be ideal if that happened

Joshua Smith
@joshua-s
Sep 18 2015 15:22
So what is the objective of killing Shared Files?
It won't die :/
Daniel Huigens
@twiss
Sep 18 2015 15:25
:D
The objective is: Shared Files is supposed to listen to changes to the file, right, so it can send changes to your collaborators. So if Shared Files dies but Firetext doesn't, that's bad because then you're not collaborating anymore.
Joshua Smith
@joshua-s
Sep 18 2015 15:26
So, the popup approach will nullify that possibility
Daniel Huigens
@twiss
Sep 18 2015 15:27
Are you sure? And what happens if you close the Shared Files window manually?
Joshua Smith
@joshua-s
Sep 18 2015 15:40
The popup is closed with it
It is layered over the app window
Still, I like the library approach better
Or, shared files could be a module
Daniel Huigens
@twiss
Sep 18 2015 15:43
Interesting, that's definitely not the case on 2.2 simulator. I'll think about a library. How would you see it as a module?
inline - The page that handles the activity will open in an overlay (on a mobile device this will be rendered in a popup over the original app that requested the activity). Subsequent behavior is exactly the same as if disposition were window.
It is not closed with the app in 2.2 simulator?
As a module, it could run in a hidden iframe
Daniel Huigens
@twiss
Sep 18 2015 15:45
Right, I thought we were testing disposition window. Still, 2.2 doesn't actually render a popup, Firetext covers the whole window
Well, with https://bugzil.la/1035053, we can have it in a separate app without requiring any interaction with that app. Still, a library could work, but using the library will be slightly involved
Joshua Smith
@joshua-s
Sep 18 2015 15:52
Yeah.
In the firetext manifest, disposition is inline
Daniel Huigens
@twiss
Sep 18 2015 15:57
It is in the collab-app branch, yes, I meant to give you a version that didn't have that. It doesn't really matter though, this is fine. I think it means that the 2 app approach would at least work on 512 mb, if we want to take that approach