Android Question [Solved]PositionsOnThailand Coding Problem

Theera

Expert
Licensed User
Longtime User
My project is PositionsOnThailand for learning which is from Erel's Example(Anchors2) ,I don't know that the problem come from tambon.csv about 7,000 records,or not? ( I coded some wrong code.)
Please help me to consider how to be resolved this problem.
 

Attachments

  • PositionsOnThailand.zip
    251.6 KB · Views: 75
Solution
Trying to load all items gives an OutOfMemoryError after 155 ms or 5835 items...
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
Index time: 155 ms (5835 Items)
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw an exception; no stack trace available

The load of the limited 500 items (there's a test for the debug mode #if debug) works fine.
Index time: 36 ms (500 Items)
1730194476047.png

1730194922318.png

The filling of the list probably needs some lazy loading... i try to look into it...
@Erel doesn't recommend using BBCodeView with large...

PaulMeuris

Well-Known Member
Licensed User
Trying to load all items gives an OutOfMemoryError after 155 ms or 5835 items...
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
Index time: 155 ms (5835 Items)
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw an exception; no stack trace available

The load of the limited 500 items (there's a test for the debug mode #if debug) works fine.
Index time: 36 ms (500 Items)
1730194476047.png

1730194922318.png

The filling of the list probably needs some lazy loading... i try to look into it...
@Erel doesn't recommend using BBCodeView with large datasets:
The generated bbcode text can get quite large. I wouldn't use BBCodeView like this with a larger dataset.
 

Attachments

  • 1730194656270.png
    1730194656270.png
    14.5 KB · Views: 62
Last edited:
Upvote 0
Solution

Theera

Expert
Licensed User
Longtime User
Trying to load all items gives an OutOfMemoryError after 155 ms or 5835 items...


The load of the limited 500 items (there's a test for the debug mode #if debug) works fine.

View attachment 158065
View attachment 158067
The filling of the list probably needs some lazy loading... i try to look into it...
@Erel doesn't recommend using BBCodeView with large datasets:
Thank you for testing
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Upvote 0
Top