|
|
|
|
|
by busymom0
1366 days ago
|
|
The entire parsing logic couldn't be separated from the app efficiently I think. It's doable but would be hard to do it efficiently. Right now, the parsing happens in Swift (and Kotlin for Android). I could maybe switch the parsing to javascript and then download the parsing code over the internet, then use javascript bridge to do the parsing. But javascript bridge is slower than swift. The better way I am thinking is to fetch the XPath/CSS query selection strings remotely on each app launch. Since fixes for the website changes usually involve me only having to modify the XPath for each element in my app, I could just modify the XPath on my server and then have my app fetch them on app launch. The XPath is just a string in the app, so it can be done. Whether this is doable obviously depends upon how big of a change the HN website HTML has. I will look into it. |
|
How much slower are we talking? 20ms vs 9ms? I feel like we developers prematurely optimize critical paths without taking the actual timeliness of the objective into account.