Assets: Does it need to be transparent?

BogDan bog_dan_ro at yahoo.com
Mon Apr 2 08:38:18 UTC 2012


Hi,


  The problem is that there are some apps on market which will be break by this change, so we must do the best to ensure backward compatibility. I think adding a new env variable which will be set by the new java part will do the trick. The plugin will look for that variable and If that variable is not set then it will have the same behavior as it is now, if that variable is set then we can use Chris's idea, all assets must start with  "/assets" or "file:///assets".

Cheers,
BogDan.


>Subject: Re: Assets: Does it need to be transparent?
> 
>
>Not only does this cause speed issues, but essentially it's "overlaying" assets on top of the rest of the file system, which can shadow real files on the device without providing an easy way to get to them. I don't think this is a good idea.
>
>
>I don't see what would be wrong with putting everything in assets/. Other platforms (i.e. MacOS) have different paths to put supporting files, and developers have to deal with those. Additionally, I personally think it would eliminate a lot of confusion over where a file is "coming from."
>
>
>Finally, Chris's patch dealing with trailing slashes was reverted because it slowed down applications further. His patch isn't the problem, it's the fact that assets has to be searched for every file that's the problem!! Besides, we can't live with a bug that requires you to put trailing slashes at the end of every path. It's confusing, inconsistent with documented Qt behavior, and certainly not the "Qt way."
>
>
>On Fri, Feb 17, 2012 at 1:25 PM, Chris Browet <cbro at semperpax.com> wrote:
>
>Hi,
>>
>>The way the Assets are implemented, every single file access made in Qt will try to go the assets first. 
>>When trying to find out why my QML app was so slow to start, I noticed that not using the assets as they are now gained me up to 20% in startup time.
>>
>>My question is thus: Is there another reason for transparency than maximal compatibility?
>>
>>If not, IMHO, it would be better to gain some speed rather that keep max compatibility. When switching platforms, the file locations are what is the least compatible, and is expected to be adjusted...
>>
>>I'd suggest to only try the assets if the path starts with "/assets" or "file:///assets"
>>
>>What do you think?
>>
>>- Chris -
>>
>>_______________________________________________
>>Necessitas-devel mailing list
>>Necessitas-devel at kde.org
>>https://mail.kde.org/mailman/listinfo/necessitas-devel
>>
>>
>
>
>
>-- 
>Tyler Mandry
>
>_______________________________________________
>Necessitas-devel mailing list
>Necessitas-devel at kde.org
>https://mail.kde.org/mailman/listinfo/necessitas-devel
>
>
>


More information about the Necessitas-devel mailing list