Before you take another step, explore the root document.
Profiling is easy.Open a Playground.Type an expression such as�� 3 tinyBenchmarksRight click and select 'Profile it'.
More generally, in a browser, look at the "Tool - Profilers"class category.�� The classic approach was�� MessageTally spyOn: [3 tinyBenchmarks]If I understand correctly, 'Profile it' uses TimeProfiler,which has a nicer interface.�� (This is in Pharo 8.)
On Sun, 3 Jan 2021 at 23:03, Roelof Wobben <r.wobben@home.nl> wrote:
I want that the code fetches a url and some data from the Rijksmuseaum api.
And as far as I see it the second it not pointless because it getting more detailed info about the painting as in the first get.
I did not profiled it because I never learned how to do that in Pharo.
Roelof
Op 3-1-2021 om 01:09 schreef Richard O'Keefe:
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 already fetched�������� and just looked at.
On Sun, 3 Jan 2021 at 01:16, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:
Hello,
I have now this code : https://github.com/RoelofWobben/Rijksmuseam
but it seems to be slow.
Can anyone help me with a way I can use a sort of cache so the page
looks first at the cache if a image is there .
If so, take the image from there , if not , ask the api for the url of
the image.
Roelof