githubbob42 / mingle2github2

0 stars 1 forks source link

Dynamic Parenting - IPad displays spinner #3391

Open githubbob42 opened 9 years ago

githubbob42 commented 9 years ago

Mingle Card: 3703 Analysis

Patience you must have, my young padawan.  Too eager you are to get your item picker quickly.  Wait you must, for the picker to open. mmmhhhHHH.

::\`--._,'.::.`._.--'/::::
::.`.  ` __::__ '  .::::::
::::.`-:.`'..`' .:-:::::::
::::::::\ `--' /::::::::::
          `--'

Ok.  The spinner eventually does goes away, but it does take about 30 seconds to do so and then the picker appears.  It works the same regardless of which RunItem you pick, the first one is very quick, the second one is very slow.

I think it’s garbage collection issue as if you wait about a minute between opening the picker, it opens right away.  Note that this only seems to happen on iPads.

It appears to be when we call this.show() in the ticket/item/picker.js code, is where it hangs, but debugging though I can see it loading data.

UPDATE: Ok.  There appears to be an issue with the indexedDbShim update.  One (or more) of the databases is not ready (creating and/or recreating) and can’t open a transaction yet.  While debugging I noticed that the sync would repeatedly call for the same objects over and over again, even though they had been successfully downloaded and saved.

It appears that the server, after sending the EventSource “done” event, is ending the response stream but the client is still keeping the stream open until the data is saved.  On slow computers, the EventSource connection sees the stream being closed as a error and automatically reconnects to the server, thus restarting that objects sync stream again.  Yusuke found that that if he closes the connection stream on the done event, that appears to fix the problem.

UPDATE (12/8/2015):  It looks like this is no longer an issue and was fixed as part of Yusuke’s PR to fix Sync Race Conditions (https://github.com/Liquidframeworks/alpine-mobile/pull/1598).

Steps to reproduce

| | |
|-|-|
|**Version #**|
|dev.fieldfx.com 4.0.1.3003on 3.0.7|
|**OS**|
| |
|**Browser**|
| |
|**Username**|
|ajf@t3.com|
|**Password**|
|computer47|
  1. Create a ticket on a Job with Rule Engine Pricebook
  2. Add RunItem and RunItem_2
  3. Select RunItem and then click Dynamic Parenting Icon
  4. Come out of the child pricebook picker and this time select RunItem_2

Expected result

Should open child price book item picker

Actual Result

Fx Spinner keeps on spinning

Related Cards

Test Plan

Tarantula: Dynamic Parenting - Add children to an existing ticket item

Checklist for Merging

githubbob42 commented 9 years ago

Related Story: #3254 Run Support: Manually add a child to a run (Mingle)