*** jayrulez has joined #sailfishos | 00:06 | |
*** MFaroTusino has joined #sailfishos | 00:13 | |
*** zhost has quit IRC | 00:17 | |
*** sardini has quit IRC | 00:19 | |
*** MFaroTusino has joined #sailfishos | 00:32 | |
*** chriadam|away is now known as chriadam | 00:33 | |
*** nahka has quit IRC | 00:34 | |
*** sardini has joined #sailfishos | 00:35 | |
*** jotik has quit IRC | 00:36 | |
*** jotik has joined #sailfishos | 00:36 | |
*** sardini has quit IRC | 00:39 | |
*** MFaroTusino has joined #sailfishos | 00:53 | |
*** Shaan7 has quit IRC | 01:11 | |
*** triggerhappy has joined #sailfishos | 01:12 | |
*** MFaroTusino has joined #sailfishos | 01:32 | |
*** Morpog_Mobile has quit IRC | 01:37 | |
*** Morpog_Mobile has joined #sailfishos | 01:48 | |
*** MFaroTusino has joined #sailfishos | 01:52 | |
*** Morpog_Mobile has quit IRC | 02:05 | |
*** MFaroTusino has joined #sailfishos | 02:13 | |
*** MFaroTusino has joined #sailfishos | 02:33 | |
*** kaxing has joined #sailfishos | 02:37 | |
*** kaxing has quit IRC | 02:41 | |
*** krabador_ has joined #sailfishos | 02:44 | |
*** kaxing has joined #sailfishos | 02:45 | |
*** jayrulez has quit IRC | 02:49 | |
*** special has quit IRC | 02:51 | |
*** special has joined #sailfishos | 02:52 | |
*** MFaroTusino has joined #sailfishos | 02:54 | |
*** krabador_ has quit IRC | 02:59 | |
*** martyone has quit IRC | 03:06 | |
*** krabador_ has joined #sailfishos | 03:07 | |
*** Kabouik has quit IRC | 03:08 | |
*** krabador_ has joined #sailfishos | 03:08 | |
*** MFaroTusino has joined #sailfishos | 03:13 | |
*** jayrulez has joined #sailfishos | 03:14 | |
*** otep has joined #sailfishos | 03:25 | |
*** otep_ has quit IRC | 03:26 | |
*** ericcc has joined #sailfishos | 03:39 | |
*** Shaan7 has joined #sailfishos | 03:48 | |
*** Bloob has joined #sailfishos | 03:53 | |
*** MFaroTusino has joined #sailfishos | 03:55 | |
*** furikku has joined #sailfishos | 03:57 | |
*** martyone has joined #sailfishos | 04:01 | |
*** kaxing has quit IRC | 04:01 | |
*** bugzy has joined #sailfishos | 04:08 | |
*** krabador_ has quit IRC | 04:08 | |
*** Eismann has joined #sailfishos | 04:12 | |
*** MFaroTusino has joined #sailfishos | 04:19 | |
*** rozhkov has quit IRC | 04:23 | |
*** rozhkov has joined #sailfishos | 04:24 | |
*** iekku has quit IRC | 04:24 | |
*** iekku has joined #sailfishos | 04:24 | |
*** zsombi has joined #sailfishos | 04:25 | |
*** jayrulez_ has joined #sailfishos | 04:30 | |
*** jayrulez has quit IRC | 04:33 | |
*** MFaroTusino has joined #sailfishos | 04:39 | |
*** Morpog_Mobile has joined #sailfishos | 04:39 | |
*** Eismann has quit IRC | 04:40 | |
*** Master-Passeli has quit IRC | 04:43 | |
*** amizraa has quit IRC | 04:44 | |
*** Master-Passeli has joined #sailfishos | 04:45 | |
*** f3an0r has joined #sailfishos | 04:47 | |
*** jpetersen_ has joined #sailfishos | 04:47 | |
*** amizraa has joined #sailfishos | 04:58 | |
*** kaxing has joined #sailfishos | 05:03 | |
*** maninc has joined #sailfishos | 05:14 | |
*** maninc has quit IRC | 05:23 | |
*** VDVsx has quit IRC | 05:37 | |
*** maninc has joined #sailfishos | 05:38 | |
*** maninc has quit IRC | 05:48 | |
*** Bloob has quit IRC | 05:56 | |
*** MFaroTusino has joined #sailfishos | 06:02 | |
*** maninc has joined #sailfishos | 06:04 | |
*** VDVsx has joined #sailfishos | 06:04 | |
*** jpetersen_ has quit IRC | 06:09 | |
*** Sfiet_Konstantin has joined #sailfishos | 06:10 | |
*** f3an0r has quit IRC | 06:11 | |
*** f3an0r has joined #sailfishos | 06:12 | |
*** triggerhappy has quit IRC | 06:13 | |
*** Sfiet_Konstantin has quit IRC | 06:16 | |
*** triggerhappy has joined #sailfishos | 06:17 | |
*** MFaroTusino has joined #sailfishos | 06:22 | |
*** dimitris91 has joined #sailfishos | 06:31 | |
*** ljp has joined #sailfishos | 06:34 | |
*** lpotter has quit IRC | 06:35 | |
*** Sfiet_Konstantin has joined #sailfishos | 06:42 | |
*** fk_lx has joined #sailfishos | 06:55 | |
*** b0bben has joined #sailfishos | 06:57 | |
*** jjanvier has joined #sailfishos | 06:58 | |
*** MMN-o has joined #sailfishos | 07:04 | |
MMN-o | Ah, and here I've just been sitting in #nemomobile all day .) | 07:05 |
---|---|---|
MMN-o | err | 07:05 |
MMN-o | all the time* | 07:05 |
Nicd- | a wild swede appears | 07:06 |
*** Sfiet_Konstantin has quit IRC | 07:07 | |
MMN-o | Yes, I'm even wild enough to make a viking berserk trip to Helsinki tomorrow | 07:07 |
*** jpetersen has joined #sailfishos | 07:08 | |
*** Morpog_N9 has joined #sailfishos | 07:08 | |
Stskeeps | in other news, ubuntu edge crowdfunding didn't make it | 07:08 |
Stskeeps | shame, would have made a nice hacking device | 07:08 |
MMN-o | and figured I might check whether any Jolla folks are around to see if it's possible to visit the office for a short while! | 07:08 |
MMN-o | Maybe pose with my first-one-shirt .) | 07:10 |
*** Sfiet_Konstantin has joined #sailfishos | 07:10 | |
*** gabriel9|work has joined #sailfishos | 07:11 | |
*** dhbiker has joined #sailfishos | 07:21 | |
*** niqt has joined #sailfishos | 07:22 | |
*** toartist has joined #sailfishos | 07:37 | |
*** jmlich has joined #sailfishos | 07:38 | |
*** MFaroTusino has joined #sailfishos | 07:56 | |
*** wirew0rm has quit IRC | 08:00 | |
*** f3an0r has quit IRC | 08:03 | |
*** dcthang has joined #sailfishos | 08:12 | |
dcthang | looks cool http://www.techweekeurope.co.uk/news/open-source-mobile-os-firefox-tizen-ubuntu-125304 | 08:12 |
*** amizraa has quit IRC | 08:14 | |
*** MFaroTusino has joined #sailfishos | 08:17 | |
*** mikhas has joined #sailfishos | 08:18 | |
*** dcthang has quit IRC | 08:26 | |
*** sledges has quit IRC | 08:31 | |
*** nahka has joined #sailfishos | 08:31 | |
*** sledges has joined #sailfishos | 08:32 | |
*** rcg has joined #sailfishos | 08:32 | |
*** t7 has joined #sailfishos | 08:34 | |
*** maninc has quit IRC | 08:41 | |
*** MFaroTusino has joined #sailfishos | 08:42 | |
*** b0bben has quit IRC | 08:43 | |
*** batteryyy has joined #sailfishos | 08:48 | |
*** maninc has joined #sailfishos | 08:54 | |
*** MFaroTusino has joined #sailfishos | 09:04 | |
*** arcean has joined #sailfishos | 09:09 | |
*** cxl000 has joined #sailfishos | 09:19 | |
*** MFaroTusino has joined #sailfishos | 09:25 | |
*** jukkaeklund has joined #sailfishos | 09:27 | |
*** jayrulez_ has quit IRC | 09:27 | |
*** jayrulez_ has joined #sailfishos | 09:27 | |
*** wirew0rm has joined #sailfishos | 09:33 | |
*** b0bben has joined #sailfishos | 09:39 | |
*** Superpelican has joined #sailfishos | 09:43 | |
*** chriadam is now known as chriadam|away | 09:43 | |
*** ericcc has quit IRC | 09:44 | |
*** MFaroTusino has joined #sailfishos | 09:44 | |
*** ericcc has joined #sailfishos | 09:47 | |
*** ericcc has quit IRC | 09:55 | |
*** alexxy has quit IRC | 10:00 | |
*** alexxy has joined #sailfishos | 10:01 | |
*** b0bben_ has joined #sailfishos | 10:04 | |
*** Kabouik has joined #sailfishos | 10:05 | |
*** b0bben has quit IRC | 10:05 | |
*** b0bben_ is now known as b0bben | 10:05 | |
*** MFaroTusino has joined #sailfishos | 10:11 | |
*** cxl000 has quit IRC | 10:14 | |
*** Shapeshifter has quit IRC | 10:27 | |
*** cxl000 has joined #sailfishos | 10:34 | |
*** b0bben has quit IRC | 10:35 | |
*** b0bben has joined #sailfishos | 10:35 | |
*** gabriel9|work has quit IRC | 10:45 | |
*** gabriel9|work has joined #sailfishos | 10:45 | |
*** zsombi has quit IRC | 10:45 | |
*** zsombi has joined #sailfishos | 10:45 | |
*** tesalmin1_ has quit IRC | 10:48 | |
*** tesalmin1 has joined #sailfishos | 10:49 | |
*** JvD_ has quit IRC | 10:49 | |
*** JvD_ has joined #sailfishos | 10:49 | |
*** kaxing has quit IRC | 10:51 | |
*** jmlich has quit IRC | 10:52 | |
*** b0bben has quit IRC | 10:55 | |
*** chriadam|away has quit IRC | 11:02 | |
*** chriadam has joined #sailfishos | 11:02 | |
*** MFaroTusino has joined #sailfishos | 11:02 | |
*** piee has joined #sailfishos | 11:06 | |
*** chriadam has quit IRC | 11:09 | |
*** chriadam has joined #sailfishos | 11:11 | |
*** maninc has quit IRC | 11:14 | |
*** f3an0r has joined #sailfishos | 11:16 | |
*** fk_lx has left #sailfishos | 11:17 | |
*** jmlich has joined #sailfishos | 11:20 | |
*** amizraa has joined #sailfishos | 11:21 | |
*** MFaroTusino has joined #sailfishos | 11:22 | |
*** dimitris91 has quit IRC | 11:22 | |
*** Superpelican has quit IRC | 11:27 | |
*** Superpelican has joined #sailfishos | 11:28 | |
*** piee has quit IRC | 11:30 | |
*** Kondou has quit IRC | 11:32 | |
*** zhost has joined #sailfishos | 11:34 | |
*** triggerhappy has quit IRC | 11:34 | |
*** Pali has joined #sailfishos | 11:38 | |
*** triggerhappy has joined #sailfishos | 11:38 | |
*** MFaroTusino has joined #sailfishos | 11:42 | |
*** triggerhappy has quit IRC | 11:44 | |
*** piee has joined #sailfishos | 11:45 | |
*** triggerhappy has joined #sailfishos | 11:45 | |
*** b0bben has joined #sailfishos | 11:47 | |
*** b0bben has quit IRC | 11:58 | |
*** MFaroTusino has joined #sailfishos | 12:02 | |
*** martyone has quit IRC | 12:05 | |
*** f3an0r has quit IRC | 12:05 | |
*** gyaresu has quit IRC | 12:07 | |
*** kaxing has joined #sailfishos | 12:11 | |
*** arcean has quit IRC | 12:13 | |
Superpelican | Sfiet_Konstantin: I'm currently writing an app that reads from 2 files | 12:15 |
Superpelican | Sfiet_Konstantin: line by line | 12:16 |
Superpelican | the app reads the question from one file | 12:16 |
Superpelican | and the correct answer from the other | 12:16 |
Superpelican | then the user has to answer the question | 12:16 |
Superpelican | and the program checks if the answer is correct | 12:16 |
Sfiet_Konstantin | and ? | 12:17 |
Superpelican | Sfiet_Konstantin: should I read both files into memory on startup | 12:17 |
Superpelican | or read on the fly? | 12:17 |
Superpelican | as the questions get answered | 12:17 |
Sfiet_Konstantin | well | 12:17 |
Superpelican | remember: I'm just reading plain text | 12:17 |
Sfiet_Konstantin | easy question | 12:17 |
Superpelican | with QFile | 12:17 |
Sfiet_Konstantin | remember one thing | 12:17 |
Superpelican | no parsing | 12:17 |
Sfiet_Konstantin | what is the fastest ? RAM or HDD ? | 12:18 |
Superpelican | RAM | 12:18 |
Sfiet_Konstantin | Superpelican: brillant: you answered your own question | 12:18 |
Sfiet_Konstantin | ! | 12:18 |
Sfiet_Konstantin | :) | 12:18 |
Superpelican | but the loading into memory uses more RAM | 12:18 |
Superpelican | and performance isn't critical | 12:18 |
Sfiet_Konstantin | never ever read from file during a process (or do this in a different thread) | 12:18 |
*** jmlich has quit IRC | 12:18 | |
Sfiet_Konstantin | reading a file can take 1s | 12:18 |
Sfiet_Konstantin | 1s in an UI is fatal | 12:18 |
Sfiet_Konstantin | performances isn't critical ? in an UI ? | 12:19 |
Superpelican | Sfiet_Konstantin: :O | 12:19 |
Superpelican | is reading from a file that slow?! | 12:19 |
Sfiet_Konstantin | it is fun because when people are doing UI, others think that it is easy and performances are non critical | 12:20 |
Sfiet_Konstantin | they are just wrong | 12:20 |
Sfiet_Konstantin | Superpelican: it can be | 12:20 |
Sfiet_Konstantin | if you don't have cache, if you dd is slow | 12:20 |
Sfiet_Konstantin | if the data is located in a wrong part of the dd | 12:20 |
Sfiet_Konstantin | if another process (tracker ?) is crawling the dd | 12:20 |
Sfiet_Konstantin | anything can happen | 12:20 |
Superpelican | I'm just reading sentences | 12:20 |
Superpelican | or words | 12:20 |
Sfiet_Konstantin | it is not your fault | 12:20 |
Sfiet_Konstantin | it is the fact that a dd is shared | 12:21 |
Sfiet_Konstantin | and that random stuff can just happen | 12:21 |
Superpelican | but I'm suprised | 12:21 |
Superpelican | that HDDs are slow | 12:21 |
Sfiet_Konstantin | (I used to say that RAM is slow, so ...) | 12:21 |
Sfiet_Konstantin | (it is a matter of perspective) | 12:21 |
Superpelican | You told me that I shouldn't worry about modern CPUs and RAM etc | 12:21 |
Sfiet_Konstantin | for 60FPS, DD can be slow | 12:21 |
Superpelican | so I expected | 12:21 |
Superpelican | you to say that reading on the fly wouldn't matter | 12:21 |
Sfiet_Konstantin | yes, but modern disks (and even SSD), you still need to be careful | 12:21 |
Sfiet_Konstantin | never :D | 12:22 |
Sfiet_Konstantin | except if it is a huge file | 12:22 |
Sfiet_Konstantin | (or a db) | 12:22 |
Superpelican | Sfiet_Konstantin: Should I read both whole files into memory then? | 12:22 |
Superpelican | or cache a bit? | 12:22 |
Sfiet_Konstantin | forget about cache | 12:22 |
Sfiet_Konstantin | if your file isn't about 10kl | 12:22 |
Superpelican | well | 12:23 |
Sfiet_Konstantin | anyway, if you have basic file, it means that you can do that in memory | 12:23 |
Superpelican | the user creates the file | 12:23 |
Sfiet_Konstantin | if the file is more complicated / long, it means that you need some specific lib | 12:23 |
Superpelican | so it could technically be anything | 12:23 |
Sfiet_Konstantin | (sqlite, json, xml etc) | 12:23 |
Superpelican | but I don't expect | 12:23 |
Sfiet_Konstantin | so that you won't do it either | 12:23 |
Superpelican | very long files | 12:23 |
Superpelican | it'd be a mad :) | 12:23 |
Sfiet_Konstantin | don't write your cache etc, it will be inefficient, as if you were writing your sort / list | 12:23 |
Sfiet_Konstantin | etc | 12:23 |
Superpelican | well | 12:23 |
Sfiet_Konstantin | Superpelican: use JSON | 12:23 |
Sfiet_Konstantin | or use a db | 12:24 |
Sfiet_Konstantin | or use XML | 12:24 |
Superpelican | why? | 12:24 |
Sfiet_Konstantin | there are so many nice stuff out there to store formatted info | 12:24 |
Superpelican | is JSON really faster!? | 12:24 |
Sfiet_Konstantin | no but it is conveinent | 12:24 |
*** MFaroTusino has joined #sailfishos | 12:24 | |
Sfiet_Konstantin | xml (with libxml) might be better though | 12:24 |
Sfiet_Konstantin | but still, I don't know | 12:24 |
*** MFaroTusino has quit IRC | 12:24 | |
Sfiet_Konstantin | but it should not be a problem | 12:24 |
Sfiet_Konstantin | basically just parse it and load it in mem | 12:24 |
Sfiet_Konstantin | and evn use json if you want | 12:24 |
Superpelican | hmm | 12:25 |
Sfiet_Konstantin | the overhead caused by the tags is limited | 12:25 |
Sfiet_Konstantin | and it is _practical_ | 12:25 |
Superpelican | I want to keep my program simple | 12:25 |
Superpelican | and the benefit of plain text | 12:25 |
Superpelican | is that the user can enter the questions in a normal text editor | 12:25 |
Superpelican | and answers of course | 12:25 |
*** jmlich has joined #sailfishos | 12:25 | |
Superpelican | Sfiet_Konstantin: are you familiar with vocabulary training applications? | 12:26 |
*** jmlich has quit IRC | 12:26 | |
*** jmlich has joined #sailfishos | 12:26 | |
Sfiet_Konstantin | no | 12:26 |
Superpelican | well | 12:26 |
Superpelican | that's basically what I'm writing | 12:26 |
*** jmlich has quit IRC | 12:26 | |
Sfiet_Konstantin | ok | 12:26 |
Superpelican | so | 12:26 |
*** jmlich has joined #sailfishos | 12:26 | |
Superpelican | Sfiet_Konstantin: does that change the answer? | 12:27 |
*** kaxing has quit IRC | 12:27 | |
Sfiet_Konstantin | if your vocabulary is huge | 12:27 |
*** piee has quit IRC | 12:27 | |
Sfiet_Konstantin | consider a db | 12:27 |
Sfiet_Konstantin | if it is like 1k wods | 12:27 |
Sfiet_Konstantin | words | 12:27 |
Sfiet_Konstantin | consider plain text parsing | 12:27 |
Sfiet_Konstantin | (maybe threaded) | 12:27 |
Sfiet_Konstantin | remember, consider that at worst a word is 100 chars | 12:28 |
Superpelican | well | 12:28 |
Sfiet_Konstantin | a char is 16 bits | 12:28 |
Sfiet_Konstantin | 1000 words | 12:28 |
Superpelican | is 10^5 chars | 12:28 |
Sfiet_Konstantin | 1000 x 100 x 16 = 1m | 12:28 |
Sfiet_Konstantin | over 1 gig | 12:28 |
Sfiet_Konstantin | 0.1% | 12:28 |
*** ericcc has joined #sailfishos | 12:29 | |
Superpelican | Sfiet_Konstantin: are you sure you didn't make a mistake? | 12:31 |
Superpelican | a C++ char is 1 byte | 12:31 |
Superpelican | according to Stack Overflow | 12:31 |
Superpelican | so | 12:31 |
*** kaxing has joined #sailfishos | 12:31 | |
Superpelican | in a worst case scenario | 12:31 |
Superpelican | let's say that every question is 100 chars | 12:31 |
Superpelican | that'd be 1 * 100 * 1000 | 12:32 |
Superpelican | if the user has 1000 questions | 12:32 |
Superpelican | that's 100000 bytes | 12:32 |
Superpelican | which is 100 kb | 12:32 |
Nicd- | a char being 1 byte depends on your encoding :P | 12:32 |
Superpelican | yes | 12:32 |
Superpelican | but if we'd make it 5 times as much then | 12:33 |
Superpelican | 500 kb? | 12:33 |
Superpelican | that's still nothing | 12:33 |
Superpelican | without modern amounts of RAM | 12:33 |
Sfiet_Konstantin | I was encoding on 16 bits | 12:34 |
Superpelican | that's 4 bytes then | 12:34 |
Superpelican | then it'll still be only 400 kb | 12:35 |
Nicd- | 2 bytes? | 12:35 |
* Superpelican 's confused now | 12:35 | |
Nicd- | a byte is 8 bits | 12:35 |
Superpelican | ah 8 bits | 12:35 |
Superpelican | yes | 12:35 |
Superpelican | srry | 12:35 |
Superpelican | then it's only 200 kb | 12:36 |
Superpelican | Sfiet_Konstantin: what would you say about 400 kb of RAM? | 12:36 |
Sfiet_Konstantin | Superpelican: what would _you_ say | 12:36 |
Superpelican | I'd say that it doesn't matter | 12:36 |
Sfiet_Konstantin | then go on | 12:36 |
Superpelican | my UI uses 30 mb alone | 12:36 |
Superpelican | (QML) | 12:36 |
Superpelican | so I don't think that 1/2 mb will matter | 12:37 |
Sfiet_Konstantin | (and having a reading thread stuff is hard to maintain) | 12:37 |
Sfiet_Konstantin | great, good answer :) | 12:37 |
Superpelican | :O konqueror uses only 106 mb for 4 tabs :) | 12:37 |
Superpelican | (of course they're not exactly the same tabs) | 12:38 |
Superpelican | but even if it'd be 150 mb | 12:38 |
Superpelican | that's still a lot better than FF | 12:38 |
*** triggerhappy has quit IRC | 12:38 | |
Sfiet_Konstantin | they have an outdated render engine though | 12:40 |
Superpelican | nope | 12:40 |
Superpelican | Sfiet_Konstantin: Konqueror can use kpart-webkit :D | 12:40 |
Superpelican | I can switch the rendering engine in the settings :D | 12:40 |
Sfiet_Konstantin | aaah | 12:40 |
Superpelican | KHTML vs WebKit | 12:41 |
Superpelican | Father vs Son :P | 12:41 |
Sfiet_Konstantin | yep :) | 12:41 |
Superpelican | Sfiet_Konstantin: so reading the answers and questions into QVectors would be OK? | 12:42 |
Superpelican | I could always use C arrays of QStrings :D | 12:43 |
Superpelican | oh | 12:43 |
Superpelican | no | 12:43 |
Sfiet_Konstantin | Superpelican: what about no ? | 12:43 |
Sfiet_Konstantin | use QList<QString> | 12:43 |
Sfiet_Konstantin | better perf | 12:43 |
Superpelican | C++ doesn't support C99's variable length arrays | 12:43 |
Superpelican | :( | 12:43 |
Superpelican | Sfiet_Konstantin: ? I've read on the web that QVectors have better pef | 12:44 |
Superpelican | s/pef/perf | 12:44 |
Sfiet_Konstantin | no | 12:44 |
Superpelican | than QLists in almost all cases | 12:44 |
Sfiet_Konstantin | it depends on the object in QVector | 12:44 |
Sfiet_Konstantin | QVector stores the T | 12:44 |
Sfiet_Konstantin | QList stores pointer on T | 12:44 |
Superpelican | ok | 12:44 |
Superpelican | so for large objects | 12:44 |
Sfiet_Konstantin | if sizeof(T) <= 4, you are gainig | 12:44 |
Sfiet_Konstantin | if not | 12:44 |
Superpelican | like long strings | 12:44 |
Superpelican | QLists are better | 12:45 |
*** MFaroTusino has joined #sailfishos | 12:45 | |
Superpelican | for ints | 12:45 |
Superpelican | you can better use QVectors? | 12:45 |
*** MFaroTusino has quit IRC | 12:45 | |
Superpelican | because sizeof(int) == sizeof(pointer) | 12:45 |
Sfiet_Konstantin | exact | 12:45 |
Sfiet_Konstantin | however, I don't know sizeof QString | 12:46 |
Sfiet_Konstantin | well actually QVector <QString> could work well as well | 12:46 |
Superpelican | hmm | 12:46 |
Sfiet_Konstantin | because QString is implicitely shared | 12:46 |
Superpelican | what does that mean? | 12:46 |
*** triggerhappy has joined #sailfishos | 12:47 | |
Superpelican | Sfiet_Konstantin: but QLists would use more memory? | 12:47 |
Superpelican | while they have better perf | 12:47 |
Superpelican | because QList needs pointers | 12:48 |
Sfiet_Konstantin | Superpelican: http://qt-project.org/doc/qt-5.0/qtcore/implicit-sharing.html | 12:48 |
Sfiet_Konstantin | Superpelican: slightly more i think | 12:48 |
Sfiet_Konstantin | yes | 12:48 |
*** Bloob has joined #sailfishos | 12:48 | |
Sfiet_Konstantin | in practice, the impact is minimal | 12:48 |
Sfiet_Konstantin | 10^5 | 12:48 |
*** arcean has joined #sailfishos | 12:48 | |
Superpelican | hmm | 12:48 |
Superpelican | but perf won't matter either | 12:48 |
Superpelican | (really much) | 12:48 |
Superpelican | "Many C++ classes in Qt use implicit data sharing to maximize resource usage" :O | 12:49 |
Sfiet_Konstantin | minimize | 12:49 |
Sfiet_Konstantin | damn, you are a doc error detector ? | 12:50 |
Superpelican | well | 12:50 |
Superpelican | this time I actually believed it | 12:50 |
Superpelican | :( | 12:50 |
*** b0bben has joined #sailfishos | 12:50 | |
Sfiet_Konstantin | read everything :) | 12:50 |
Superpelican | but it doesn't really make sense | 12:50 |
Superpelican | actually | 12:50 |
Superpelican | so basically implicit sharing can be compared a bit to passing by pointer or reference? | 12:51 |
Superpelican | less copying | 12:51 |
Superpelican | and the nice thing about implicit sharing is that you don't have to worry about pointers and references yourself, right? | 12:51 |
Superpelican | Sfiet_Konstantin: ^ | 12:52 |
Sfiet_Konstantin | yes | 12:52 |
Sfiet_Konstantin | yes | 12:52 |
Sfiet_Konstantin | yes | 12:52 |
Superpelican | :) | 12:52 |
Sfiet_Konstantin | but good behaviour: use const QString &something in methods | 12:52 |
Sfiet_Konstantin | always pass objects as (const) refences | 12:53 |
Sfiet_Konstantin | don't pass them as value | 12:53 |
Superpelican | :nod: | 12:53 |
Superpelican | I had already done that with std::vector s in my non-Qt CLI app :) | 12:53 |
Superpelican | because a function only needed to read | 12:53 |
*** f3an0r has joined #sailfishos | 12:54 | |
*** otep_ has joined #sailfishos | 13:00 | |
Superpelican | Sfiet_Konstantin: So what's preferred a QList or a QVector? | 13:00 |
*** otep has quit IRC | 13:00 | |
Sfiet_Konstantin | as you wish | 13:00 |
Sfiet_Konstantin | I always use QList for basically anything | 13:00 |
*** bob has joined #sailfishos | 13:01 | |
*** bob is now known as Guest22745 | 13:01 | |
*** b0bben has quit IRC | 13:02 | |
*** Guest22745 is now known as b0bben | 13:02 | |
Superpelican | Sfiet_Konstantin: what about QVarlengtharray? | 13:03 |
Sfiet_Konstantin | read docs | 13:03 |
Sfiet_Konstantin | (WTF is QVarlengtharray) | 13:03 |
* Sfiet_Konstantin read docs | 13:03 | |
Superpelican | yep it exists | 13:03 |
Superpelican | it's more low level | 13:03 |
Superpelican | so I thought maybe it has better perf | 13:03 |
Superpelican | and less fancy features | 13:03 |
Sfiet_Konstantin | stick with QList | 13:04 |
Sfiet_Konstantin | enogh | 13:04 |
Sfiet_Konstantin | don't search for pure perfs, or you will be doing C | 13:04 |
Sfiet_Konstantin | I have never seen anyone using QVarLengthArray (but it might exist) | 13:04 |
Superpelican | Sfiet_Konstantin: http://qt-project.org/doc/qt-5.1/qtcore/qvarlengtharray.html | 13:05 |
*** MFaroTusino has joined #sailfishos | 13:05 | |
Sfiet_Konstantin | I know the docs :) I have them on my QtC | 13:06 |
Sfiet_Konstantin | and it is always opened | 13:06 |
Sfiet_Konstantin | IMO | 13:06 |
Sfiet_Konstantin | stick with upper level classes | 13:06 |
*** f3an0r has quit IRC | 13:06 | |
Superpelican | Sfiet_Konstantin: this is an interesting part: http://paste.kde.org/p8e3d0bbe/ | 13:07 |
Superpelican | Sfiet_Konstantin: but what do they mean with "tight loops"? | 13:08 |
*** piee has joined #sailfishos | 13:10 | |
Sfiet_Konstantin | In summary, QVarLengthArray is a low-level optimization class that only makes sense in very specific cases. It is used a few places inside Qt and was added to Qt's public API for the convenience of advanced users. | 13:11 |
Superpelican | Sfiet_Konstantin: do you think a QVector/QList with structs with 2 QStrings in them would be more efficient than 2 QVectors/QLists? | 13:11 |
Sfiet_Konstantin | this is more interesting | 13:12 |
Superpelican | -_- | 13:12 |
Superpelican | that part was in my paste too | 13:12 |
Superpelican | ;) | 13:12 |
Sfiet_Konstantin | :D | 13:12 |
Superpelican | last line | 13:12 |
Sfiet_Konstantin | yes | 13:12 |
Sfiet_Konstantin | it is the most important part | 13:12 |
Sfiet_Konstantin | don't bother using it | 13:12 |
Superpelican | Sfiet_Konstantin: [15:11] <Superpelican> Sfiet_Konstantin: do you think a QVector/QList with structs with 2 QStrings in them would be more efficient than 2 QVectors/QLists? | 13:12 |
Sfiet_Konstantin | Superpelican: depends on your code | 13:12 |
Sfiet_Konstantin | since you are reading from two files | 13:12 |
Sfiet_Konstantin | you might have an index problem | 13:12 |
Sfiet_Konstantin | (like one list smaller than the other) | 13:13 |
Superpelican | well | 13:13 |
Superpelican | that won't happen | 13:13 |
Sfiet_Konstantin | so a single list with either QPair, or struct might be safer | 13:13 |
Sfiet_Konstantin | Superpelican: that's what you said | 13:13 |
Sfiet_Konstantin | it _can_ happen | 13:13 |
Superpelican | Sfiet_Konstantin: there *have* to be as much answers as there are questions ;) | 13:13 |
Superpelican | one file for questions, the other one for the answers | 13:13 |
Sfiet_Konstantin | what if someone modified one of them | 13:13 |
Superpelican | well | 13:14 |
Superpelican | the program will check | 13:14 |
Superpelican | the length of the files first | 13:14 |
Superpelican | how many lines | 13:14 |
Superpelican | each line contains an answer/a question | 13:14 |
Sfiet_Konstantin | in short, my answer will be "depends on your style, both are correct" | 13:14 |
Sfiet_Konstantin | and I won't give a longer answer :D | 13:14 |
Superpelican | :( | 13:14 |
Superpelican | Sfiet_Konstantin: does Qt do any threading in the background, aside from GUI stuff? | 13:15 |
Sfiet_Konstantin | Superpelican: what are you expecting ? | 13:16 |
Superpelican | well | 13:16 |
Sfiet_Konstantin | Qt Webkit spawns several threads | 13:16 |
Superpelican | well | 13:16 |
Superpelican | that's not what I'm expecting | 13:16 |
Sfiet_Konstantin | QML image loading, when set to asyncrhonous, is done in another thread | 13:16 |
Superpelican | QML = GUI | 13:16 |
Sfiet_Konstantin | (but GUI is done in the main thread) | 13:17 |
Superpelican | Sfiet_Konstantin: well I was thinking | 13:17 |
Superpelican | maybe | 13:17 |
Sfiet_Konstantin | it is, I'm sure ;) | 13:17 |
Superpelican | using structs will be slower | 13:17 |
Sfiet_Konstantin | ah | 13:17 |
Superpelican | because the program will need to access 2 files | 13:17 |
Sfiet_Konstantin | na | 13:18 |
Superpelican | and otherwise | 13:18 |
Sfiet_Konstantin | create a QList<Struct> | 13:18 |
Superpelican | it'll fill one vector from one file first | 13:18 |
Sfiet_Konstantin | open the two files at the same time | 13:18 |
Sfiet_Konstantin | read them all | 13:18 |
Superpelican | and then the other vector with the other file | 13:18 |
Sfiet_Konstantin | and then fill the struct | 13:18 |
Superpelican | Sfiet_Konstantin: and how would you do that? | 13:18 |
Sfiet_Konstantin | will be the same as reading one and then another | 13:18 |
Sfiet_Konstantin | QFile *file1 | 13:18 |
Superpelican | but | 13:18 |
Sfiet_Konstantin | or read all in two lists, and merge them | 13:18 |
Superpelican | I'm reading line by line | 13:18 |
Superpelican | one line = one element in the QVector/QList | 13:19 |
Sfiet_Konstantin | do what's conveinent | 13:19 |
Sfiet_Konstantin | ^^^ ^ | 13:19 |
Sfiet_Konstantin | you can read 2 lists, and merge them | 13:19 |
Sfiet_Konstantin | or keep them separate | 13:19 |
Sfiet_Konstantin | etc. | 13:19 |
Sfiet_Konstantin | do what's conveinent | 13:19 |
Superpelican | so in other words | 13:19 |
Superpelican | don't matter about perf too much? | 13:19 |
Superpelican | Sfiet_Konstantin: ^^ | 13:20 |
Superpelican | Sfiet_Konstantin: BTW, do you think 35-40 mb is too much for a vocabulary training program? | 13:21 |
Superpelican | as in RAM usage | 13:21 |
Sfiet_Konstantin | Superpelican: what do you think ? | 13:22 |
*** piee has quit IRC | 13:22 | |
Sfiet_Konstantin | Superpelican: (it was not about perfs, but more about coding style. Do what works (c)) | 13:22 |
Sfiet_Konstantin | Superpelican: I find it slightly excessive | 13:23 |
Sfiet_Konstantin | I wonder where does this overhead comes | 13:23 |
Sfiet_Konstantin | tbh | 13:23 |
Superpelican | Sfiet_Konstantin: well, QML UI | 13:23 |
Superpelican | Sfiet_Konstantin: https://bitbucket.org/Superpelican/local-es/src | 13:24 |
*** MFaroTusino has joined #sailfishos | 13:25 | |
Sfiet_Konstantin | still | 13:25 |
Sfiet_Konstantin | don't think it should be _that_ much | 13:25 |
Superpelican | Sfiet_Konstantin: it's a pretty norma lUI in IMO | 13:25 |
*** b0bben has quit IRC | 13:25 | |
Sfiet_Konstantin | strange | 13:25 |
*** niqt has quit IRC | 13:25 | |
Superpelican | Sfiet_Konstantin: could too much anchors be the cause? | 13:25 |
Sfiet_Konstantin | I have to look at how much weatherfish uses in mem | 13:26 |
Sfiet_Konstantin | maybe debug mode ? | 13:26 |
Sfiet_Konstantin | tried comiling in release ? | 13:26 |
Sfiet_Konstantin | and does it include shared mem ? | 13:26 |
Superpelican | yes | 13:26 |
Sfiet_Konstantin | what is the size of shared mem used ? | 13:27 |
*** Dudalus has joined #sailfishos | 13:28 | |
Superpelican | well | 13:29 |
Superpelican | Sfiet_Konstantin: I'm not sure if it includes shared mem | 13:29 |
Superpelican | but | 13:29 |
Superpelican | Ksysguard | 13:29 |
Superpelican | says about 27 mb for "memory" | 13:29 |
Superpelican | and about 21 mb for "shared memory" | 13:29 |
Sfiet_Konstantin | is it a desktop app ? | 13:30 |
*** piee has joined #sailfishos | 13:30 | |
*** jayrulez_ has quit IRC | 13:30 | |
Superpelican | yes | 13:31 |
Superpelican | Qt5 | 13:31 |
Superpelican | but | 13:32 |
Superpelican | I'm intending to port it to Sailfish some day | 13:32 |
Superpelican | Sfiet_Konstantin: so it shouldn't use too much RAM | 13:33 |
veskuh | That sounds pretty normal. QML runtime with JS engine need memory. And the do reserve some buffers for example heap for JS objects. | 13:34 |
Superpelican | Sfiet_Konstantin: and it doesn't even use images | 13:34 |
Sfiet_Konstantin | veskuh: sounds a bit big imo | 13:35 |
*** piee has quit IRC | 13:35 | |
Sfiet_Konstantin | but I don't know much about Qt internals to say that | 13:35 |
*** itbaron has joined #sailfishos | 13:35 | |
Sfiet_Konstantin | (my apps just "works" in constrained env ...) | 13:35 |
Superpelican | I don't think my app is very special | 13:35 |
Superpelican | so I don't really understand | 13:36 |
veskuh | Sfiet_Konstantin, initial footprint is quite big yes, so even hello world (in QML) would use about the same. | 13:36 |
Superpelican | well, let's try it :P | 13:36 |
Superpelican | I'll use the Qt5 QtC template app | 13:37 |
Sfiet_Konstantin | veskuh: ok | 13:37 |
Superpelican | which is similiar | 13:37 |
Sfiet_Konstantin | isn't the mem mostly in shared ? | 13:37 |
veskuh | Sfiet_Konstantin, so for example helloworld in our SDK would be about on par with those numbers. | 13:37 |
Superpelican | hmm Qt5 QtQuick 2 template in Qt5 SDK is a hello world app indeed | 13:38 |
Superpelican | so I'm gonna try how much mem it uses | 13:38 |
Superpelican | I closed QtC | 13:38 |
Superpelican | hah | 13:39 |
Superpelican | Sfiet_Konstantin: Ksysguard reports 25 mb mem and 18 mb shared | 13:39 |
Superpelican | my app uses 27 mb mem | 13:39 |
Superpelican | and 21 mb shared | 13:39 |
Superpelican | so that's next to nothing | 13:39 |
Superpelican | veskuh: ^^ | 13:40 |
Superpelican | veskuh: So in a Qt5 only env with many QtQuick 2 apps running, you think that the overall mem usage will be acceptable? | 13:41 |
veskuh | Superpelican, probably the 6mb difference is private data for Qt's structures and some buffers. If that part increases a lot during lifetime of an app then I'd be worried. | 13:41 |
Superpelican | veskuh: read: "the Jolla" ;) | 13:41 |
Superpelican | well | 13:41 |
Superpelican | I don't have any data | 13:41 |
*** jukkaeklund has quit IRC | 13:41 | |
Superpelican | it's just an UI for now | 13:41 |
veskuh | yeah, I mean they share the 21mb so you really consume about ~6MB per running app. | 13:42 |
Superpelican | ah OK | 13:42 |
Superpelican | so that should be OK on the Jolla? | 13:42 |
veskuh | sure | 13:42 |
Superpelican | and of course | 13:42 |
Superpelican | my openSUSE install doesn't have Qt5 yet | 13:42 |
*** MFaroTusino has joined #sailfishos | 13:45 | |
*** jayrulez has joined #sailfishos | 13:48 | |
*** b0bben has joined #sailfishos | 13:50 | |
*** datagutt has joined #sailfishos | 13:55 | |
*** MFaroTusino has joined #sailfishos | 14:06 | |
*** M4rtinK has joined #sailfishos | 14:08 | |
*** fk_lx has joined #sailfishos | 14:09 | |
*** jpetersen has quit IRC | 14:10 | |
*** kaxing has quit IRC | 14:10 | |
*** zhost has quit IRC | 14:13 | |
*** datagutt has quit IRC | 14:15 | |
*** piee has joined #sailfishos | 14:15 | |
ericcc | use ubuntu | 14:18 |
Sfiet_Konstantin | ericcc: no | 14:18 |
Sfiet_Konstantin | :D | 14:18 |
*** ericcc has quit IRC | 14:20 | |
Superpelican | ericcc, Sfiet_Konstantin: use openSUSE Tumbleweed :D | 14:20 |
*** qwazix_ has joined #sailfishos | 14:21 | |
*** qwazix_ has quit IRC | 14:21 | |
*** ericcc has joined #sailfishos | 14:22 | |
Sfiet_Konstantin | Superpelican: ericcc, use what you want | 14:22 |
Superpelican | :( | 14:23 |
Superpelican | no flamewars ;( | 14:23 |
Superpelican | :P | 14:23 |
*** arcean has quit IRC | 14:24 | |
*** MFaroTusino has joined #sailfishos | 14:26 | |
ericcc | install qt on ubntu is too easy | 14:27 |
Superpelican | eh | 14:28 |
Superpelican | ericcc: openSUSE has Qt too :P | 14:28 |
Superpelican | it's just that's 12.3 is stuck on Qt4.8 | 14:28 |
Superpelican | but 13.1 (which will be released in Nov) will undoubtly come with Qt5 | 14:28 |
Superpelican | ericcc: And until 13.1 you can always use Tumbleweed :D | 14:29 |
Superpelican | I'm thinking about switching to Tumbleweed | 14:29 |
Superpelican | because 12.3 is becoming a bit old by now | 14:29 |
Yaniel | I just use arch | 14:29 |
*** b0bben has quit IRC | 14:30 | |
Superpelican | well | 14:30 |
Superpelican | I don't really have the time to configure Arch | 14:31 |
Superpelican | that's the biggest thing that's holding me back ;) | 14:31 |
Superpelican | I'd rather spend that time learning C++ and QML ;) | 14:31 |
Superpelican | I'd love to switch to Tumblewed | 14:31 |
Superpelican | s/Tumblewed/Tumbleweed | 14:31 |
Superpelican | but if I break something | 14:31 |
Superpelican | I don't have any time to fix it :( | 14:32 |
Superpelican | my holiday ends tomorrow :( | 14:32 |
Superpelican | I'm especially worried about VBox | 14:32 |
Superpelican | which I also need for Sailfish | 14:32 |
Superpelican | of course | 14:32 |
*** Dudalus has quit IRC | 14:33 | |
Superpelican | :O | 14:33 |
Superpelican | konqueror really does use less RAM than FF | 14:33 |
Superpelican | sorry Mozilla/FF/Gecko | 14:33 |
*** toartist_ has joined #sailfishos | 14:34 | |
Yaniel | well | 14:34 |
Yaniel | it took me "only" a couple of days to figure things out enough to use it | 14:35 |
Superpelican | you mean Arch? | 14:35 |
Yaniel | yes | 14:35 |
Yaniel | but yeah you need to have a good idea of where things are etc | 14:35 |
Superpelican | I have used Manjaro | 14:35 |
Superpelican | for a time | 14:35 |
Superpelican | (if you know that) | 14:35 |
Yaniel | no | 14:35 |
Superpelican | it's based on Arch | 14:35 |
*** otep has joined #sailfishos | 14:35 | |
Superpelican | so I'm familiar with pacman for example | 14:36 |
Superpelican | but it comes preconfigured | 14:36 |
Superpelican | so the installation was pretty friendly | 14:36 |
*** toartist__ has joined #sailfishos | 14:36 | |
Yaniel | I'm glad I chose to install vanilla arch | 14:36 |
*** toartist has quit IRC | 14:37 | |
*** otep_ has quit IRC | 14:37 | |
Superpelican | Yaniel: But what about the occasional breakages? | 14:37 |
Yaniel | because it forced me to learn some things I have needed since | 14:37 |
Superpelican | I really can't have system that randomly breaks | 14:37 |
Superpelican | sometimes I just *need* it to work | 14:37 |
Superpelican | and not have that I suddenly get a black screen because some upgrade broke X | 14:37 |
Superpelican | sometimes I just need to get some work done | 14:38 |
Superpelican | and have a reliable system | 14:38 |
Superpelican | that supports me | 14:38 |
Yaniel | I have had only three things break so far | 14:38 |
Superpelican | and that were? | 14:38 |
Yaniel | two of which were announced on the webpage before the upgrade | 14:38 |
Yaniel | (moving to netctl and moving binaries to /usr) | 14:39 |
Superpelican | well that sounds pretty critical | 14:39 |
*** toartist_ has quit IRC | 14:39 | |
Yaniel | the latter didn't actually even break stuff that badly | 14:39 |
Superpelican | I do really like Arch's wiki though | 14:39 |
Yaniel | what did was that the newest refind-efi was broken | 14:39 |
*** VDVsx has quit IRC | 14:39 | |
Superpelican | it can be really handy | 14:39 |
Yaniel | so I chrooted from a usb stick to roll back refind-efi and everything worked nicely again | 14:40 |
Yaniel | (my raspberry pi was not that lucky) | 14:40 |
Superpelican | well | 14:40 |
Superpelican | if I for example had a BBB or RPi | 14:41 |
Superpelican | I'd have no problem with installing Arch on it | 14:41 |
Superpelican | just can't use it as my main system | 14:41 |
Superpelican | I need something that *just works* | 14:42 |
Superpelican | or at least that if I have a problem I can postpone it | 14:42 |
Superpelican | so I can fix it when I have time for it | 14:42 |
Superpelican | but not at random moments | 14:42 |
Yaniel | sure | 14:42 |
*** arcean has joined #sailfishos | 14:42 | |
*** ericcc has quit IRC | 14:44 | |
*** ericcc has joined #sailfishos | 14:44 | |
*** VDVsx has joined #sailfishos | 14:53 | |
*** MFaroTusino has joined #sailfishos | 14:54 | |
*** datagutt has joined #sailfishos | 14:59 | |
Superpelican | Sfiet_Konstantin: I'm using 2 QVectors after all because then the files can be load in memory asynchronously more easily | 15:08 |
Superpelican | read: file 1 can be load into memory while the user chooses file 2 | 15:08 |
Superpelican | that's a nice advantage IMO | 15:09 |
Sfiet_Konstantin | hum | 15:11 |
Sfiet_Konstantin | are you using async loading ? | 15:11 |
Sfiet_Konstantin | QThread ? | 15:11 |
Superpelican | well no | 15:11 |
Sfiet_Konstantin | Superpelican: so no | 15:11 |
Superpelican | Sfiet_Konstantin: but | 15:11 |
Sfiet_Konstantin | there is no asyncrhonous loading | 15:11 |
Superpelican | when the user navigates around in the file dialog | 15:11 |
Superpelican | file 1 can be loaded | 15:11 |
*** toartist__ has quit IRC | 15:11 | |
Sfiet_Konstantin | Superpelican: well, technically file 1 is already loaded even before the dialog got displayed | 15:12 |
Sfiet_Konstantin | (if you call the "loadFile" method or something like that, before calling "showDialog") | 15:12 |
Superpelican | that's not true | 15:12 |
Sfiet_Konstantin | Superpelican: show me a paste | 15:12 |
Superpelican | it's impossible | 15:12 |
Sfiet_Konstantin | -_- | 15:12 |
Sfiet_Konstantin | it is "impossible" :D | 15:13 |
Superpelican | Sfiet_Konstantin: the program needs to know which file user chooses | 15:13 |
Sfiet_Konstantin | is your code closed source :P | 15:13 |
Superpelican | -_- | 15:13 |
Sfiet_Konstantin | na, I mean if you call loadFile for file 1 | 15:13 |
Sfiet_Konstantin | while showing dialog for file 2 | 15:13 |
Superpelican | that's exactly what I'm aiming for | 15:13 |
Sfiet_Konstantin | (s/while/before/à | 15:13 |
Sfiet_Konstantin | still, your file will be totally loaded before the "showdialog" method is called | 15:13 |
Superpelican | while the user navigates in the file dialog to choose file 2 | 15:14 |
Sfiet_Konstantin | hence not /asynchronous/ | 15:14 |
Superpelican | the program loads file 1 into mem | 15:14 |
Superpelican | eh | 15:14 |
Superpelican | isn't the GUI/QML thread seperated? | 15:14 |
Superpelican | Sfiet_Konstantin: ^ | 15:14 |
*** zsombi has quit IRC | 15:14 | |
Sfiet_Konstantin | no | 15:15 |
Sfiet_Konstantin | do that | 15:15 |
Superpelican | ? | 15:15 |
Sfiet_Konstantin | declare a C++ slot doing while(true) {} | 15:15 |
Sfiet_Konstantin | call it from QML | 15:15 |
Sfiet_Konstantin | :) | 15:15 |
Superpelican | and then the whole UI will be blocked, you mean? | 15:15 |
Superpelican | Sfiet_Konstantin: but my slot has a void return type | 15:16 |
*** MFaroTusino has joined #sailfishos | 15:16 | |
Superpelican | Sfiet_Konstantin: so QML doesn't have anything to wait for | 15:16 |
*** gabriel9|work has quit IRC | 15:17 | |
Sfiet_Konstantin | Superpelican: yes | 15:17 |
*** rm_work|away is now known as rm_work | 15:17 | |
Sfiet_Konstantin | Superpelican: don't care about the signature of the slot | 15:17 |
Sfiet_Konstantin | the call is just like that | 15:18 |
Superpelican | so does QML wait for Cpp or not? | 15:18 |
Sfiet_Konstantin | someCodeInQML call yourC++Method | 15:18 |
Sfiet_Konstantin | yourC++Method do processing. QML is blocked | 15:18 |
Sfiet_Konstantin | yourC++Method returns, QML continue execution | 15:18 |
Sfiet_Konstantin | Superpelican: QML waits C++ | 15:18 |
Superpelican | Sfiet_Konstantin: and what if I'd define a slot that returns 0 and calls another method | 15:19 |
*** arcean has quit IRC | 15:19 | |
Superpelican | and let that method do the processing | 15:19 |
Bloob | that method will be called before the other one finishes | 15:19 |
Bloob | as always | 15:19 |
Superpelican | ah | 15:20 |
Superpelican | so | 15:20 |
Superpelican | of course | 15:20 |
Superpelican | how stupid of me | 15:20 |
Superpelican | the slot won't return until the method returns | 15:20 |
Superpelican | Sfiet_Konstantin: do you think that implementing threading is worth it for my app? | 15:21 |
Sfiet_Konstantin | Superpelican: no | 15:23 |
Sfiet_Konstantin | (in short) | 15:23 |
Sfiet_Konstantin | detailed: no, parsing a small file won't generate too much overhead | 15:23 |
Sfiet_Konstantin | even a lag of ~1/4s is ok | 15:23 |
Sfiet_Konstantin | even 1s ? | 15:23 |
Sfiet_Konstantin | maybe not 1s | 15:23 |
Sfiet_Konstantin | but if your file grows, you will have to be cautious | 15:23 |
Sfiet_Konstantin | separate file parsing clearly | 15:23 |
Superpelican | Sfiet_Konstantin: How long do you estimate that loading a file with about 100 sentences of 100 chars into mem will take? | 15:24 |
Sfiet_Konstantin | just in case a thread is needed | 15:24 |
Yaniel | 100 is nothing | 15:24 |
Sfiet_Konstantin | Superpelican: unknown: depends on disk, caching system, os | 15:24 |
Sfiet_Konstantin | etc. | 15:24 |
Sfiet_Konstantin | but don't worth threading | 15:24 |
Superpelican | Sfiet_Konstantin: what do you mean with seperating file parsing? | 15:24 |
Sfiet_Konstantin | Superpelican: in a different method class | 15:25 |
Sfiet_Konstantin | separate it in term of code | 15:25 |
Superpelican | eh | 15:25 |
Superpelican | a whole seperate calss? | 15:25 |
Superpelican | s/calss/class | 15:25 |
Sfiet_Konstantin | don't integrate the file parsing in other code so you won't find the cause of slow down when you switch to 10kl | 15:25 |
Superpelican | so a seperate method? | 15:25 |
Superpelican | that's ok | 15:25 |
Sfiet_Konstantin | Superpelican: it always _depends_ on your code | 15:25 |
Sfiet_Konstantin | do what you find conveinent | 15:25 |
Superpelican | was planning on doing that anyway | 15:25 |
Sfiet_Konstantin | today it might be a method, but tomorrow ? | 15:26 |
Sfiet_Konstantin | why not a class ? | 15:26 |
Superpelican | because that'll complicate the program a lot more and it's heavyweight | 15:27 |
Superpelican | a whole seperate class | 15:27 |
Sfiet_Konstantin | Superpelican: explain heavywheight | 15:28 |
Yaniel | pfff | 15:28 |
Superpelican | well | 15:28 |
Sfiet_Konstantin | it adds either 0 symbol | 15:28 |
Sfiet_Konstantin | or maybe 2 (constructor, destructor) | 15:28 |
Sfiet_Konstantin | and a vtable ? | 15:28 |
Superpelican | classes aren't very small data types, are they? | 15:28 |
Sfiet_Konstantin | alright, 3 symbols | 15:28 |
Sfiet_Konstantin | 3 symbols | 15:28 |
*** M4rtinK has quit IRC | 15:28 | |
Sfiet_Konstantin | (while a method adds 1 symbol) | 15:28 |
Yaniel | Superpelican: well I have a class for shaders | 15:28 |
Superpelican | yeah | 15:29 |
Yaniel | which are essentially 3 unsigned integers | 15:29 |
*** fk_lx has quit IRC | 15:29 | |
Yaniel | heck, I could even reduce it to just 1 | 15:29 |
Sfiet_Konstantin | Superpelican: today you need a method, but maybe tomorrow. You never know in advance what will be the future evolution of your code | 15:29 |
Superpelican | but your program is probably much more complicated | 15:29 |
Sfiet_Konstantin | so just be prepared | 15:29 |
Superpelican | Sfiet_Konstantin: yes | 15:29 |
Superpelican | but I won't change this part of my code | 15:29 |
Sfiet_Konstantin | Superpelican: if you thread it ? | 15:29 |
rcg | Superpelican, that's what all devs thought :D | 15:30 |
Sfiet_Konstantin | I bet you will put it in a QRunnable and execute it in a QThreadPool | 15:30 |
Sfiet_Konstantin | or execute it as a subclass under QThread | 15:30 |
Superpelican | well | 15:31 |
Superpelican | it's only about 10 lines of code | 15:31 |
Superpelican | it's just reading a file line by line | 15:31 |
Superpelican | and putting each line into a vector element | 15:31 |
Superpelican | Sfiet_Konstantin, rcg: ^ | 15:32 |
*** Morpog_N9 has quit IRC | 15:33 | |
Superpelican | Sfiet_Konstantin, rcg: I understand what you're trying to do, but I think you are overestimating my program a bit ;) | 15:33 |
rcg | Superpelican, well, that was more like making fun of the statement, "but I won't change this part of my code", because i've heard that often, even said that often myself and nearly everytime this ended up being false ;) | 15:33 |
Bloob | what rcg said | 15:34 |
Bloob | most of the time modularity > performance | 15:34 |
rcg | Superpelican, i think what Sfiet_Konstantin and Yaniel are trying to tell you is to focus on your structure instead of performance and be prepared "just in case" | 15:34 |
Superpelican | yes | 15:35 |
*** Morpog_N9 has joined #sailfishos | 15:35 | |
rcg | also what Bloob says :) | 15:35 |
Superpelican | but if I want to change the loading into memory part | 15:35 |
Superpelican | I'll change it heavily | 15:35 |
Superpelican | and just throw away all code | 15:35 |
Superpelican | so I don't think it applies for those 10 lines | 15:35 |
*** Sfiet_Konstantin has quit IRC | 15:35 | |
rcg | Superpelican, in the end it's up to you. imho there is no such thing like an always perfect solution. personally, i am a fan of pragmatic solutions | 15:37 |
rcg | e.g., if you are even not sure about your requirements it might be overkill to think hours about the perfect design. instead quickly prototyping something might give you much better insight in what you really wanna do and help you improve your design later on | 15:38 |
*** zhost has joined #sailfishos | 15:38 | |
*** amizraa has quit IRC | 15:38 | |
Superpelican | rcg: I think that applies to my application | 15:38 |
Superpelican | I'll probably rewrite parts sometime later | 15:38 |
Superpelican | as I learn more | 15:38 |
Superpelican | and I don't think I'll reuse those 10 lines | 15:39 |
rcg | so it kinda boils down to something vague like "it depends on the situation" or "do whatever you think is right" | 15:39 |
Superpelican | ok | 15:39 |
Superpelican | have to leave now though | 15:39 |
Superpelican | bbl | 15:39 |
rcg | but if you think about performance vs. structure go for structure first, like the others said :) | 15:40 |
*** MFaroTusino has joined #sailfishos | 15:40 | |
Superpelican | ok thanks for all the advice :) | 15:40 |
*** MFaroTusino has quit IRC | 15:40 | |
*** jmlich has quit IRC | 15:43 | |
*** Superpelican has quit IRC | 15:44 | |
*** amizraa has joined #sailfishos | 15:51 | |
*** Shaan7 has quit IRC | 15:53 | |
*** Shaan7 has joined #sailfishos | 15:54 | |
*** jjanvier has quit IRC | 16:00 | |
*** MFaroTusino has joined #sailfishos | 16:02 | |
*** t7 has quit IRC | 16:08 | |
*** rcg has quit IRC | 16:09 | |
*** triggerhappy has quit IRC | 16:09 | |
*** piee has quit IRC | 16:11 | |
*** Eismann has joined #sailfishos | 16:14 | |
*** Kondou has joined #sailfishos | 16:14 | |
*** ericcc has quit IRC | 16:21 | |
*** MFaroTusino has joined #sailfishos | 16:22 | |
*** Vlad_on_the_road has joined #sailfishos | 16:24 | |
*** jpetersen has joined #sailfishos | 16:25 | |
*** Fleda has quit IRC | 16:28 | |
*** Fleda has joined #sailfishos | 16:31 | |
*** jukkaeklund has joined #sailfishos | 16:38 | |
*** Morpog_N9_ has joined #sailfishos | 16:39 | |
*** Morpog_N9 has quit IRC | 16:41 | |
*** jukkaeklund has quit IRC | 16:42 | |
*** MFaroTusino has joined #sailfishos | 16:43 | |
*** MFaroTusino has joined #sailfishos | 16:44 | |
*** spider-mario has joined #sailfishos | 16:47 | |
*** piggz has joined #sailfishos | 16:48 | |
*** Morpog_N9_ has quit IRC | 16:54 | |
*** special has quit IRC | 17:05 | |
*** special has joined #sailfishos | 17:05 | |
*** rcg has joined #sailfishos | 17:07 | |
*** MFaroTusino has joined #sailfishos | 17:11 | |
*** rm_work is now known as rm_work|away | 17:13 | |
*** mikhas has quit IRC | 17:18 | |
*** Superpelican has joined #sailfishos | 17:23 | |
*** master_of_master has joined #sailfishos | 17:31 | |
*** Superpelican has quit IRC | 17:32 | |
*** master_o1_master has quit IRC | 17:34 | |
*** MFaroTusino has joined #sailfishos | 17:39 | |
*** rm_work|away is now known as rm_work | 17:50 | |
*** b0bben has joined #sailfishos | 17:53 | |
*** Morpog_Mobile has quit IRC | 17:57 | |
*** MFaroTusino has joined #sailfishos | 18:02 | |
*** b0bben_ has joined #sailfishos | 18:18 | |
*** Venemo_ has joined #sailfishos | 18:20 | |
*** MFaroTusino has joined #sailfishos | 18:22 | |
*** jjarven has quit IRC | 18:29 | |
*** special has quit IRC | 18:41 | |
*** special has joined #sailfishos | 18:41 | |
*** b0bben_ has quit IRC | 18:45 | |
*** MFaroTusino has joined #sailfishos | 18:47 | |
*** jjarven has joined #sailfishos | 18:56 | |
*** furikku has quit IRC | 19:01 | |
*** zhost has quit IRC | 19:03 | |
*** MFaroTusino has joined #sailfishos | 19:07 | |
*** MFaroTusino has quit IRC | 19:07 | |
*** Venemo_ has quit IRC | 19:16 | |
*** jjarven has quit IRC | 19:27 | |
*** MFaroTusino has joined #sailfishos | 19:31 | |
*** Venemo_ has joined #sailfishos | 19:35 | |
*** jjarven has joined #sailfishos | 19:39 | |
*** itbaron has quit IRC | 19:42 | |
*** Jck_true has quit IRC | 19:43 | |
*** Jck_true has joined #sailfishos | 19:44 | |
*** arcean has joined #sailfishos | 19:46 | |
*** rcg has quit IRC | 19:48 | |
*** edgar2 has quit IRC | 19:53 | |
*** jpetersen_ has joined #sailfishos | 19:56 | |
*** MFaroTusino has joined #sailfishos | 19:57 | |
*** Bloob has quit IRC | 19:58 | |
*** ajalkane has joined #sailfishos | 19:59 | |
*** jpetersen has quit IRC | 20:00 | |
*** Venemo has joined #sailfishos | 20:12 | |
*** Venemo has quit IRC | 20:13 | |
*** Venemo has joined #sailfishos | 20:14 | |
*** special has quit IRC | 20:16 | |
*** special has joined #sailfishos | 20:16 | |
*** MFaroTusino has joined #sailfishos | 20:17 | |
*** MFaroTusino has quit IRC | 20:17 | |
*** Venemo has quit IRC | 20:18 | |
*** arcean has quit IRC | 20:18 | |
*** ajalkane has quit IRC | 20:21 | |
*** Venemo_ has quit IRC | 20:33 | |
*** zhost has joined #sailfishos | 20:34 | |
*** M13 has joined #sailfishos | 20:43 | |
*** MFaroTusino has joined #sailfishos | 20:44 | |
*** M13 has quit IRC | 20:46 | |
*** special has quit IRC | 20:49 | |
*** special has joined #sailfishos | 20:49 | |
*** jstaniek has joined #sailfishos | 20:49 | |
*** Pali has quit IRC | 21:05 | |
*** Morpog_PC has joined #sailfishos | 21:09 | |
*** pixraider has quit IRC | 21:10 | |
*** MFaroTusino has joined #sailfishos | 21:12 | |
*** Vlad_on_the_road has quit IRC | 21:15 | |
*** ljp has quit IRC | 21:20 | |
*** lpotter has joined #sailfishos | 21:21 | |
*** lpotter has quit IRC | 21:24 | |
*** fk_lx has joined #sailfishos | 21:24 | |
*** lpotter has joined #sailfishos | 21:25 | |
*** lpotter has quit IRC | 21:30 | |
*** lpotter has joined #sailfishos | 21:31 | |
*** b0bben has quit IRC | 21:35 | |
*** MFaroTusino has joined #sailfishos | 21:37 | |
*** lpotter has quit IRC | 21:39 | |
*** Morpog_PC has quit IRC | 21:40 | |
*** MFaroTusino has quit IRC | 21:41 | |
*** spider-mario has quit IRC | 21:41 | |
*** lpotter has joined #sailfishos | 21:46 | |
*** MFaroTusino has joined #sailfishos | 21:58 | |
*** MFaroTusino has quit IRC | 21:58 | |
*** rashm2k has joined #sailfishos | 22:12 | |
*** rashm2k has quit IRC | 22:14 | |
*** rashm2k has joined #sailfishos | 22:15 | |
*** rashm2k has joined #sailfishos | 22:16 | |
*** MFaroTusino has joined #sailfishos | 22:19 | |
*** rashm2k has quit IRC | 22:19 | |
*** MFaroTusino has quit IRC | 22:19 | |
*** DrIDK has joined #sailfishos | 22:23 | |
*** dhbiker has quit IRC | 22:32 | |
*** mjones_ has quit IRC | 22:35 | |
*** jstaniek has quit IRC | 22:36 | |
*** MFaroTusino has joined #sailfishos | 22:39 | |
*** jayrulez has quit IRC | 22:44 | |
*** faenil has quit IRC | 22:45 | |
*** jpetersen_ has quit IRC | 22:51 | |
*** piee has joined #sailfishos | 22:53 | |
*** MFaroTusino has joined #sailfishos | 22:59 | |
*** mjones_ has joined #sailfishos | 23:08 | |
*** fk_lx has quit IRC | 23:10 | |
*** zhost has quit IRC | 23:13 | |
*** piee has quit IRC | 23:13 | |
*** piee has joined #sailfishos | 23:21 | |
*** MFaroTusino has joined #sailfishos | 23:22 | |
*** piee has quit IRC | 23:35 | |
*** roric has joined #sailfishos | 23:36 | |
*** nahka has quit IRC | 23:39 | |
*** MFaroTusino has joined #sailfishos | 23:42 | |
*** cxl000 has quit IRC | 23:50 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!