Just my input to the cache thing. Pharo has a class named LRUCache (Least
Recently Used Cache), which is very helpful for such.
If you want to store it on disk instead of the image Estaban's suggestion
seems like the way to go.
Best,
Kasper
You can also try https://github.com/ba-st/Superluminal which has caching
support among other things.
On Wed, 6 Jan 2021, 16:42 Esteban Maringolo, wrote:
> To avoid doing something like that, and for a web scrapping tool I
> wrote, I implemented a basic subclass of ZnClient (called
> ZnCachingCli
To avoid doing something like that, and for a web scrapping tool I
wrote, I implemented a basic subclass of ZnClient (called
ZnCachingClient) that used a disk cache where each key/file was the
hash of the requested URL.
I haven't used in a while but it should continue to work, in any case,
I publi
Op 6-1-2021 om 19:36 schreef Richard
Sargent:
On Wed, Jan 6, 2021 at 10:34
AM Roelof Wobben via Pharo-users
wrote:
Thanks,
On Wed, Jan 6, 2021 at 10:34 AM Roelof Wobben via Pharo-users <
pharo-users@lists.pharo.org> wrote:
>
> Thanks,
>
> Right now im downloading/fetching the images every time again.
>
> As I see it, the biggest bottleneck is that I have 10 images.
> And for all 10 I fetching the image and the data I
Thanks,
Right now im downloading/fetching the images every time again.
As I see it, the biggest bottleneck is that I have 10 images.
And for all 10 I fetching the image and the data I could display when a
user wants it.
So that will be 20 calls to the api.
So maybe some cache could be handy
Roelof,
Working with multiple high resolution images, as I believe you are doing, is
always going to be a real challenge, performance wise. It just takes time to
transfer lots of data.
First you have to make sure that you are not doing too much work (double
downloads, using too high resolution
What do you want the code to do?
Have you profiled the code to see where the time is going?
A quick look at the code shows
- Paintings does one web get
- each Painting does two more web gets
! and the first of those seems to be pretty pointless,
as it refetches an object that Paintings a