Comments (9)
Form name is embedded in the XML. You could avoid this if you scan and load the form name into a database (and just scan for differences).
from briefcase.
Thanks @mitchellsundt! Any other reason why Briefcase would try to load the form? Or rather, why was it done this way to begin with?
from briefcase.
The original coding intentionally avoided any embedded database and relied upon the directory structure to deduce what was in the storage area. The database was added later to improve the pull / push efficiency. And its use was never extended to other areas of the code (higher priorities).
From a usability standpoint, improving the pull / push speed impacts the viability of the app for user-interface-mediated interactions (because users have to sit and monitor the app for task completion after they click, e.g., "Pull"). For CLI interactions, where you might have this running in a polling script, start-up time could become more critical to acceptance. Especially if the intention is to rapidly migrate data into another backend process (e.g, implementing a publisher via ODK Briefcase).
And users can always prune their briefcase storage area by moving the forms they are rarely interested in into a different storage folder (via dragging). Only if the user is accessing all forms does this become a significant issue.
from briefcase.
@rclakmal Interested in taking this on?
from briefcase.
Yes. Will look into this :-)
from briefcase.
Gentlemen.. Couldn't look in to this until today. But starting off now...!
from briefcase.
@icemc Any chance you can take a look at this issue for the next release?
from briefcase.
So based on my understanding of the code:
-
when starting briefcase, it read and parse form file to get: form id, form name, form version. form name will be used in the combobox display, form id + form version used in the equals and hashcode which will be used in the combobox creation (there’s internal calls to equals i think inside combobox code).
-
we can skip the parsing and change the implementation to use md5 hash of the form file for equals and form’s filename in the form name
— pros: maybe less coding, but a lot of ifs and flags
— cons: lots of ifs and flags -
the other approach is creating database record for the form definition and replace the parsing with reading database
— pros: no parsing
— cons: need to sync physical file and db when opening briefcase
Another simpler other option is creating cache for parsed form definition. I'm proposing this because I notice that one method that build the form definition list is being called 4 times. So if you have 4 forms locally, then each will be parsed 4 times (16 parsing process). Method: FileSystemUtils.getBriefcaseFormList().
from briefcase.
I like the cache option. And as you described in our chat, we should not just have a basic XML parse because "because the BriefcaseFormDefinition needs the JavaRosaParserWrapper and you can’t easily create the parser without parsing the form definition XML". Maybe put a cache folder in the Briefcase storage directory?
I am still concerned that doing this before we load the UI. Can you file that as a separate issue? I think the solution is to move that work to a background thread.
from briefcase.
Related Issues (20)
- Crash on export when submission is empty HOT 1
- Crash on reloading from Central server not right after configuring it HOT 1
- Crash on attempted cancel of pull from Central server when offline
- Socket closed when pushing 3k+ submissions to Central HOT 3
- Forms with external secondary instances aren't shown on export or push tabs HOT 1
- Crash when pulling forms with spaces in formId from Central
- Pull before export doesn't work for forms from Central
- Pull from Collect directory where a few versions of the same form are available is not possible HOT 1
- On pull from Central, submission attachments are not requested if submission folder exists
- Forms aren’t immediately showing up in push or export after a canceled pull - only with Java 8
- Export is crashing after canceling pull when empty submissions are created - Java 8
- Make documentation link in Central push warning dialog clickable
- Support empty form versions when doing multi-version push to Central
- Form selection is lost and status is missing on Export tab when pull before export process in progress
- Briefcase tabs are disabled when run on java 9 and 10 and select sd on Windows
- Pull/Push/Export tabs are still active when the storage location is cleared HOT 3
- On export, skip encrypted submissions with manifest but no .enc file and mark as failed
- Form selection and individual export configuration in export tab becomes disabled
- Export using CLI ok, but freezes / hangs using GUI (Key too long?)
- Export of encrypted submissions using Briefcase UI fails HOT 6
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 briefcase.